Android Migration Guide
If you are using the Zendrive SDK, this guide will help you with the quick steps you need to follow to migrate to 3.x
version of the Fairmatic SDK.
warning
Copy the Fairmatic SDK key, available in the advanced tab of the settings screen on the Fairmatic dashboard. Use the Fairmatic SDK key for the Fairmatic SDK. Note that the Fairmatic SDK key can NOT be used with the Zendrive SDK or vice versa.
1. Update the dependency version in your build files
implementation 'com.fairmatic:sdk:3.0.2'
2. Add drivequant maven to your repositories block (settings.gradle or build.gradle )
repositories {
maven {
url "https://maven.drivequant.com/repository/android-sdk/"
}
}
3. Bump your minSdk version to 26
minSdk 26
4. Remove your ZendriveBroadcastReceiver
implementation and all its usages
5. Remove your ZendriveNotificationProvider
implementation and all its usages. This has been changed as a parameter on the setup method (FairmaticTripNotification
)
6. Split ZendriveDriverAttributes alias
into 2 parameters - firstName
& lastName
private val fairmaticDriverAttributes = FairmaticDriverAttributes(
firstName = "John",
lastName = "Doe",
email = "john_doe@company.com",
phoneNumber = "1234567890"
)
7. Use FairmaticSettingsCallback
, instead of ZendriveSettingsCallback
. Change onComplete
List<FairmaticSettingError>
object : FairmaticSettingsCallback {
override fun onComplete(errors: List<FairmaticSettingError>) {
...
}
}