Android SDK Migration Guide
InfoWe strongly recommend using the latest version of IDWise SDK. This ensures you always have access to the latest improvements, bug fixes, and security updates.
Migrating from v5.5.x to v5.6.x
We have update our SDK to target android-15 with Edge-to-Edge UI handling. If you are already targeting to android-15 then there is no need change. If not, then you need to update the following:
- Update the AGP version to minimum v8.4.0 if you are on an older version
- Update the kotlin version to minimum v1.9.21 if you are on an older version
- You may also need to look at the other changes comes with upgrading to these versions. Here's the guide to do so.
Migrating from v5.4.x to v5.5.x
We are now serving our SDK from our Secure Repository, so in order to add our SDK, please add the following repository URL in your project level build.gradle.
maven { url 'https://mobile-sdk.idwise.ai/releases/' }Upgrade AGP to minimum 7.1.2, if you are using and older one.
Migrating from v4.x.x to v5.x.x
This guide will help you to migrate from version 4.x.x to version 5.x.x of IDWise SDK.
Simple SDK Code Changes
If you are using Simple SDK integration please follow the following sections to change your code to be compatible with the new version:
IDWise.initialize method:
IDWise.initialize method:- The
themeparameter has its type changed fromIDWiseSDKThemetoIDWiseTheme
The following code:
IDWise.initialize("CLIENT_KEY", IDWiseSDKTheme.SYSTEM_DEFAULT) { error->
//some error occured
}Should be changed to be like this:
val clientKey = "<YOUR_CLIENT_KEY>"
val theme = IDWiseTheme.SYSTEM_DEFAULT //[LIGHT, DARK, SYSTEM_DEFAULT]
IDWise.initialize(clientKey=clientKey, theme=theme) { error ->
error?.printStackTrace()
}IDWise.startJourney method:
IDWise.startJourney method:- This method now takes a new optional parameter named
applicantDetailswhich is aHashMap<String,String>. You can pass this parameter asnullif you do not intend to use it. For further information, please check the documentation. - The parameter
journeyDefinitionIdis now renamed toflowId - The parameter
callbackis now renamed tojourneyCallbacks
The following code:
IDWise.startJourney("FLOW_ID", "REFERENCE_NUMBER", "LOCALE", journeyCallbacks)Should be changed to become:
IDWise.startJourney(
context = this,
flowId = "FLOW_ID",
referenceNo = "REFERENCE_NUMBER",
locale = "LOCALE",
applicantDetails = null, //optional
journeyCallbacks = journeyCallbacks
)IDWise.resumeJourney method:
IDWise.resumeJourney method:- The parameter
journeyDefinitionIdparameter is now renamed toflowId - The parameter
callbackis now renamed tojourneyCallbacks
The following code:
IDWise.resumeJourney("FLOW_ID", "YOUR_JOURNEY_ID", journeyCallbacks)Should be changed to become:
IDWise.resumeJourney(
context = this,
flowId = "FLOW_ID",
journeyId = "JOURNEY_ID
locale = "LOCALE",
journeyCallbacks = journeyCallbacks
)IDWiseSDK Journey Callback Interface Methods
The callback interface type IDWiseSDKCallback is now re-named to IDWiseJourneyCallbacks
onJourneyStarted Callback Method
onJourneyStarted Callback Method- This callback method previously provides
journeyInfo: JourneyInfobut now the parameter changed to becomejourneyStartedInfo: JourneyStartedInfo. The new typeJourneyStartedInfocontains Journey Id as a sub field.
The following code:
override fun onJourneyStarted(journeyInfo: JourneyInfo) {
Log.d("IDWiseSDKCallback", "onJourneyStarted $journeyInfo")
}Should be changed to become:
override fun onJourneyStarted(journeyStartedInfo: JourneyStartedInfo) {
Log.d("IDWiseSDKCallback", "onJourneyStarted $journeyStartedInfo")
}onJourneyResumed Callback Method
onJourneyResumed Callback Method- This callback method previously provides
journeyInfo: JourneyInfobut now the parameter changed to becomejourneyResumedInfo: JourneyResumedInfo. The new typeJourneyResumedInfocontains Journey Id as a sub field.
The following code:
override fun onJourneyResumed(journeyInfo: JourneyInfo) {
Log.d("IDWiseSDKCallback", "onJourneyResumed $journeyInfo")
}Should be changed to become:
override fun onJourneyResumed(journeyResumedInfo: JourneyResumedInfo) {
Log.d("IDWiseSDKCallback", "onJourneyResumed $journeyResumedInfo")
}onJourneyCompleted Callback Method
onJourneyCompleted Callback Method- This callback method previously provides
journeyInfo: JourneyInfoandisSucceeded: Booleanbut now the parameter changed to becomejourneyCompletedInfo: JourneyCompletedInfo. The new typeJourneyCompletedInfocontainsjourneyIdandisSuccessas a sub fields.
The following code:
override fun onJourneyCompleted(journeyInfo: JourneyInfo,isSucceeded: Boolean) {
Log.d("IDWiseSDKCallback", "onJourneyCompleted $journeyInfo")
}Should be changed to become:
override fun onJourneyCompleted(journeyCompletedInfo: JourneyCompletedInfo) {
Log.d("IDWiseSDKCallback", "onJourneyCompleted $journeyCompletedInfo")
}onJourneyCancelled Callback Method
onJourneyCancelled Callback Method- This callback method previously provides
journeyInfo: JourneyInfobut now the parameter changed to becomejourneyCancelledInfo: JourneyCancelledInfo. The new typeJourneyCancelledInfocontains Journey Id as a sub field.
The following code:
override fun onJourneyCancelled(journeyInfo: JourneyInfo) {
Log.d("IDWiseSDKCallback", "onJourneyCancelled $journeyInfo")
}Should be changed to become:
override fun onJourneyCancelled(journeyCancelledInfo: JourneyCancelledInfo) {
Log.d("IDWiseSDKCallback", "onJourneyCancelled $journeyCancelledInfo")
}onError Callback Method
onError Callback Method- This delegate method previously provides parameter of type
IDWiseSDKError. But the type of this parameter was changed to becomeIDWiseError.IDWiseErrorhas nowcodeandmessageas subfields.
The following code:
override fun onError(error: IDWiseSDKError) {
Log.d("IDWiseSDKCallback", "onError ${error.message}")
}Should be changed to become:
override fun onError(error: IDWiseError) {
Log.d("IDWiseSDKCallback", "onError ${error.message}")
}Dynamic SDK Code Changes
If you are using Dynamic SDK integration please follow the following sections to change your code to be compatible with the new version. Dynamic SDK methods can now be accessed via IDWiseDynamic instead of IDWise.
IDWise.initialize method:
IDWise.initialize method:IDWise.initializecan now be called asIDWiseDynamic.initialize- The
themeparameter has its type changed fromIDWiseSDKThemetoIDWiseTheme
The following code:
IDWise.initialize("CLIENT_KEY", IDWiseSDKTheme.SYSTEM_DEFAULT) { error->
//some error occured
}Should be changed to be like this:
val clientKey = "<YOUR_CLIENT_KEY>"
val theme = IDWiseTheme.SYSTEM_DEFAULT //[LIGHT, DARK, SYSTEM_DEFAULT]
IDWiseDynamic.initialize(clientKey=clientKey, theme=theme) {
error -> error?.printStackTrace()
}IDWise.startDynamicJourney method:
IDWise.startDynamicJourney method:IDWise.startDynamicJourneycan now be called asIDWiseDynamic.startJourney- This method now takes a new optional parameter named
applicantDetailswhich is aHashMap<String,String>. You can pass this parameter asnullif you do not intend to use it. For further information, please check the documentation. - The parameter
journeyDefinitionIdis now renamed toflowId - The parameter
callbackis now renamed tojourneyCallbacks - The parameter
stepCallbackis now renamed tostepCallbacks
The following code:
IDWise.startDynamicJourney("FLOW_ID", "REFERENCE_NUMBER", "LOCALE", journeyCallbacks,stepCallbacks)Should be changed to become:
IDWiseDynamic.startJourney(
context = this,
flowId = "FLOW_ID",
referenceNo = "REFERENCE_NUMBER",
locale = "LOCALE",
applicantDetails = null, //optional
journeyCallbacks = journeyCallbacks,
stepCallbacks = stepCallbacks
)IDWise.resumeDynamicJourney method:
IDWise.resumeDynamicJourney method:IDWise.resumeDynamicJourneycan now be called asIDWiseDynamic.resumeJourney- The parameter
journeyDefinitionIdparameter is now renamed toflowId - The parameter
callbackis now renamed tojourneyCallbacks - The parameter
stepCallbackis now renamed tostepCallbacks
The following code:
IDWise.resumeDynamicJourney("FLOW_ID", "YOUR_JOURNEY_ID", journeyCallbacks, stepCallbacks)Should be changed to become:
IDWiseDynamic.resumeJourney(
context = this,
flowId = "FLOW_ID",
journeyId = "JOURNEY_ID
locale = "LOCALE",
journeyCallbacks = journeyCallbacks,
stepCallbacks = stepCallbacks
)IDWise.startStep method:
IDWise.startStep method:IDWise.startStepcan now be called asIDWiseDynamic.startStep
The following code:
IDWise.startStep(context, stepId)It should be changed to become:
IDWiseDynamic.startStep(context, stepId)IDWise.skipStep method:
IDWise.skipStep method:IDWise.skipStepcan now be called asIDWiseDynamic.skipStep
The following code:
IDWise.skipStep(stepId)It should be changed to become:
IDWiseDynamic.skipStep(stepId)IDWise.getJourneySummary method:
IDWise.getJourneySummary method:IDWise.getJourneySummarycan now be called asIDWiseDynamic.getJourneySummary
The following code:
IDWise.getJourneySummary() { journeySummary, error ->
// journeySummary contains the status of all steps and overall journey status
}It should be changed to become:
IDWiseDynamic.getJourneySummary() { journeySummary, error ->
// journeySummary contains the status of all steps and overall journey status
}IDWise.finishDynamicJourney method:
IDWise.finishDynamicJourney method:IDWise.finishDynamicJourneycan now be called asIDWiseDynamic.finishJourney
The following code:
IDWise.finishDynamicJourney()It should be changed to become:
IDWiseDynamic.finishJourney()IDWise.unloadSDK method:
IDWise.unloadSDK method:IDWise.unloadSDKcan now be called asIDWiseDynamic.unloadSDK
The following code:
IDWise.unloadSDK()It should be changed to become:
IDWiseDynamic.unloadSDK()IDWiseSDK Step Callback Interface Methods
The callback interface type IDWiseSDKStepCallback is now re-named to IDWiseStepCallbacks.
onStepCaptured Callback Method
onStepCaptured Callback Method- This callback method previously provides
stepId: String, bitmap: Bitmap?, croppedBitmap: Bitmap?but now the parameter changed to becomestepCapturedInfo: StepCapturedInfo. The new typeStepCapturedInfocontainsstepId,croppedImageandoriginalImageas a sub fields.
The following code:
override fun onStepCaptured(stepId: String, bitmap: Bitmap?, croppedBitmap: Bitmap?) {
//This event triggers when User has captured the image from the camera
}Should be changed to become:
override fun onStepCaptured(stepCapturedInfo: StepCapturedInfo) {
//This event triggers when User has captured the image from the camera
}onStepResult Callback Method
onStepResult Callback Method- This callback method previously provides
stepId: String, stepResult: StepResult?but now the parameter changed to becomestepResultInfo: StepResultInfo. The new typeStepResultInfocontainsstepIdandStepResultas a sub fields.
The following code:
override fun onStepResult(stepId: String, stepResult: StepResult?) {
Log.d("onStepResult", "Step $stepId result!!")
}Should be changed to become:
override fun onStepResult(stepResultInfo: StepResultInfo) {
Log.d("onStepResult", "$stepResultInfo")
}onStepCancelled Callback Method
onStepCancelled Callback Method- This callback method previously provides
stepId: Stringbut now the parameter changed to becomestepCancelledInfo: StepCancelledInfo. The new typeStepCancelledInfocontainsstepIdas a sub field.
The following code:
override fun onStepCancelled(stepId: String) {
Log.d("onStepCancelled", "Step $stepId cancelled!!")
}Should be changed to become:
override fun onStepCancelled(stepCancelledInfo: StepCancelledInfo) {
Log.d("onStepCancelled", "$stepCancelledInfo")
}onStepSkipped Callback Method
onStepSkipped Callback Method- This callback method previously provides
stepId: Stringbut now the parameter changed to becomestepSkippedInfo: StepSkippedInfo. The new typeStepSkippedInfocontainsstepIdas a sub field.
The following code:
override fun onStepSkipped(stepId: String) {
Log.d("onStepCancelled", "Step $stepId cancelled!!")
}Should be changed to become:
override fun onStepCancelled(stepCancelledInfo: StepCancelledInfo) {
Log.d("onStepCancelled", "$stepCancelledInfo")
}onStepConfirmed Callback Method
onStepConfirmed Callback Method- This callback method is removed and no longer the part of the Step Callbacks
Updated about 1 month ago
