Android SDK Installation Guide

Install the Driversiti software development kit into your existing application to activate Driversiti behavioral recognition. Roll it out in less than 30 minutes and watch the data and events fly out.

The Driversiti SDK takes in data from your smartphone's sensors with minimal battery impact. It automatically detects the start and end of a trip, detects specific events and uploads the full trip data to Driversiti's servers for reporting and analysis. Trip events and analysis are then available through Driversiti's portal.

Installation Requirements:

  • Android API 15 (Ice Cream Sandwich) and above.
  • Google Play Services 8.3.0 and above.
  • Internet connection for registration then works offline if required.

Latest Released SDK Version:

  • 2.2.27-RELEASE
  • Module ID: com.apiosystems:androidSDK:2.2.27-RELEASE

Get the SDK:

  • To use DriversitiSDK you will need a Consumer Key (developer key). The Consumer Key is provided once your application has been approved. To access the consumer key, login to the developer portal and navigate to "my apps", select your recently approved "Driver Safety" application and your consumer key will be available.

SDK Documentation:

Sample Application:

  1. Download Android Driversiti Sample App.
  2. Edit gradle file.
    1. apply plugin: ''
          maven {
              name = "apioRepoRel"
              url = ""
              credentials {
      /*            username = project.artifactoryUsername
                  password = project.artifactoryPassword
      android {
          compileSdkVersion 23
          buildToolsVersion '23.0.0'
          defaultConfig {
              applicationId ""
              minSdkVersion 15
              targetSdkVersion 22
              versionCode 1
              versionName "1.0"
          buildTypes {
              release {
                  minifyEnabled false
                  proguardFiles getDefaultProguardFile('proguard-android.txt'), ''
          lintOptions {
              abortOnError false
          packagingOptions {
              exclude 'META-INF/DEPENDENCIES.txt'
              exclude 'META-INF/LICENSE.txt'
              exclude 'META-INF/NOTICE.txt'
              exclude 'META-INF/NOTICE'
              exclude 'META-INF/LICENSE'
              exclude 'META-INF/DEPENDENCIES'
              exclude 'META-INF/notice.txt'
              exclude 'META-INF/license.txt'
              exclude 'META-INF/dependencies.txt'
              exclude 'META-INF/LGPL2.1'
      dependencies {
         compile fileTree( dir: 'libs',include: ['*.jar'])
          compile(group: 'com.apiosystems', name: 'androidSDK', version: '2.2.11-RELEASE', ext: 'aar', changing: true, transitive: true)
          compile ''
          compile ''
          //compile the stetho package
          debugCompile 'com.facebook.stetho:stetho:1.2.0'
          //If there are conflicts with volley or play-services you can exclude them like this:
          //compile(group: 'com.apiosystems', name: 'androidSDK', version: 2.2.11-RELEASE, ext: 'aar',changing: true, transitive: true){
          //    exclude group: '', module: ‘volley’
          //    exclude group: ‘', module: 'play-services-location'
          //    exclude group: ‘', module: 'play-services-maps'
          //    exclude group: ‘', module: 'play-services-analytics'
  3. Ammend with Consumer Key.
    1. private static final String DRIVERSITI_APPLICATION_ID = "{{Your_Consumer_Key}}";
  4. Build Application in Android Studio and install on device.
  5. Register through Sample Driversiti Application.
  6. Login to to review your driving data.

SDK Types:

  • .aar file
    • DriversitiSDK framework
    • Additionally Includes:
      •  useful resources, activities and layouts
  • Eclipse library project
    • DriversitiSDK framework
    • Additionally includes:
      • useful resources, activities and layouts.

SDK Delivery options:

  • Use the Driversiti maven artifactory

SDK Installation:

Google Play Services setup:

Follow the setup instructions to add a reference to the Google Play Services library in your project.

Android Support libraries:

Follow the Android Support Libraries setup documenatation.

Update AndroidManifest:

If using the .jar file option referenced above please add these permission after opening the <manifest> tag and before the <application> tag. The .aar option will automatically merge the manifest for you.


<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

IDE Instructions:

Android Studio:

Latest version of Android Studio

Update to the latest stable version of Android Studio. This will also ensure that Gradle is also present.

  • Make sure that Google Play Services is setup for your Android Studio project. The DriversitiSDK requires Activity Recognition and the Google Play Location API.
  • Update your build.gradle file with the correct maven repository download link to the SDK and set up the compile dependency.
repositories {
    maven {
    compile 'com.apiosystems:androidSDK:2.2.27-RELEASE'


  • Run Gradle sync from Android Studio
  • Build the project

Initialize the SDK:

public class MainActivity extends AppCompatActivity {
    protected void onCreate(Bundle savedInstanceState) {
        DriversitiConfiguration driversitiConfiguration = new DriversitiConfiguration.ConfigurationBuilder()
                .setSetupHandler(new DriversitiConfiguration.SetupHandler() {
                    public void onSetupSuccess() {
                        Log.i(LOG_TAG, "Driversiti setup successfull");
                    public void onSetupFailure(DriversitiException errorMessage) {
                        Log.i(LOG_TAG, "Driversiti setup error: " + errorMessage);
        DriversitiSDK driversitiSDK = Driversiti.getSDK();

Add to

Proguard Rules
# Rules for firebase
-dontwarn org.w3c.dom.bootstrap.DOMImplementationRegistry
-keep class com.firebase.** { *; }
-keep class org.apache.** { *; }
-keepnames class com.fasterxml.jackson.** { *; }
-keepnames class javax.servlet.** { *; }
-keepnames class org.ietf.jgss.** { *; }
-dontwarn org.apache.**
-dontwarn org.w3c.dom.**
-dontwarn com.gryphonet.**
-dontwarn org.apache.cordova.**
-keep class com.amazonaws.** { *; }
-keep class com.squareup.okhttp.** { *; }
-keep class com.squareup.okhttp.OkHttpClient { *; }
-keep class com.squareup.okhttp.OkUrlFactory { *; }
-keep class org.apache.** { *; }
-keep class** { *; }
-keep class org.apache.commons.collections4.queue.CircularFifoQueue { *; }


Eclipse (deprecated):

Warning: Please contact if you need to use the Eclipse Project distribution

Warning - do not use Eclipse

Eclipse Android ADT support has been deprecated by Google. We highly recommend using Android Studio.

More info:


  • Make sure that Google Play Services and Android Support Libraries are setup for your Eclipse project.
  • Download the DriversitiSDK Eclipse Library Project zip file.
  • Import the DriversitiSDK project into your Eclipse workspace (File > Import > Android > Existing Code into Workspace).
  • In the DriversitiSDK Project Properties, under the "Android" section, add Google Play Services library.
  • In the DriversitiSDK Project Properties, under the "Android Build Path" (or "Java Build Path") section, add the two JARs in the libs/ directory.
  • In your App's Project Properties, under the "Android" section, add the SDK project as a library.
  • Update your build path if needed.
  • Now you can use the layouts, resources, and APIs from the SDK.
  • Build the project.