SDK Setup
Requirements
The SDK supports Android version 5.0 ("Lollipop", API level 21) or higher and the following ABIs:
- armeabi-v7a
- arm64-v8a
Integrating the SDK
Adding the dependencies
In order to add the SDK library to your application insert the following code into your app's build.gradle
:
android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } repositories { maven { url 'http://spb.navmii.com:8081' credentials { username "public" password "public" } } maven { url 'https://repository.apache.org/content/repositories/snapshots/' } } dependencies { compile ('com.navmii.android:dashcam-sdk:1.1.2-61@aar') { transitive = true } }
If you want to always use the latest version of the SDK, you can specify a dynamic version instead of a fixed one. For example:
dependencies { compile ('com.navmii.android:dashcam-sdk:1.+@aar') { transitive = true } }
Adding API Key to the Manifest
Add the following lines to the AndroidManifest.xml
of your application within the <application></application>
block:
<meta-data android:name="com.navmii.sdk.API_KEY" android:value="<YOUR_API_KEY>" />
Setting the permissions
Add the following lines to the AndroidManifest.xml
within the <manifest></manifest>
block:
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-feature android:glEsVersion="0x00020000" android:required="true" /> <uses-feature android:name="android.hardware.camera" android:required="true" /> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" /> <uses-feature android:name="android.hardware.location.gps" android:required="true" />
If you want to record audio, also add the following permission:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
API Reference
Please follow the link below for API reference
http://spb.navmii.com/dashcam-SDK/android/javadoc/