Setup

For adding library via gradle please follow below steps:

  1. Copy slbusauthsdk.aar file (previous page) into app/libs folder of app directory. If libs folder is not present create one.

  2. In app level build.gradle, add the following to the repositories element:

repositories {
    flatDir {
        dirs 'libs'
    }
}

3. And to the dependencies element:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation(name: "slbusauthsdk-release", ext: "aar")

    // Since SDK are using these libraries need to add them in app as well
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'org.apache.commons:commons-math3:3.6.1'
    ...
}

Declare the following permissions in the Manifest:

<!-- for passenger app -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-feature
    android:name="android.hardware.bluetooth_le"
    android:required="true" />


<!-- for driver app -->

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-feature
    android:name="android.hardware.bluetooth_le"
    android:required="true" />

Last updated