Migration Guide version 5+

Welcome SDK Migration from V5.32.0 to 5.33.0

1. Update core-light dependency to the latest version

implementation 'com.incode.sdk:core-light:2.6.6'

2. If you use any of following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:camera:1.1.0'
implementation 'com.incode.sdk:qr-face-login:1.2.4'

2. Dependency removal

The kiosk-login dependency is no longer available and has been removed in this version of the SDK. Please update your project configuration accordingly.

Remove the kiosk-login dependency from your build.gradle.

implementation 'com.incode.sdk:kiosk-login:version'

3. Changes to callback methods

Callback methods in the OnboardingListener that previously had nullable arguments (?) have been updated to use non-nullable arguments instead.
The onError callback methods now also use a non-nullable error: Throwable argument. If your code defines nullable arguments (?) for these callbacks, you will need to remove the (?) to align with the updated interface.

For example:

Replace

override fun onSelfieScanCompleted(selfieScanResult: SelfieScanResult?) {}
override fun onError(error: Throwable?) {}

With

override fun onSelfieScanCompleted(selfieScanResult: SelfieScanResult) {}
override fun onError(error: Throwable) {}

Login mode HYBRID was removed

The FaceAuthMode#HYBRID option has been removed, as it is no longer supported by our backend. Please replace with FaceAuthMode#SERVER.

Welcome SDK Migration from V5.30.0 to 5.31.0

1. Update core-light dependency to the latest version

implementation 'com.incode.sdk:core-light:2.6.5'

2. If you use any of the following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:camera:1.0.1'
implementation 'com.incode.sdk:model-face-recognition:3.2.0'
implementation 'com.incode.sdk:model-liveness-detection:3.2.0'

Welcome SDK Migration from V5.29.0 to 5.30.0

Transition to the New ID Capture Experience

This feature is currently available in opt-in mode, controlled via a feature flag. To opt in, please contact the Customer Support team.

Welcome SDK Migration from V5.28.0 to 5.29.0

Upgrade compileSdk

With the update of the internal Compose dependencies, you will need to upgrade your project's compileSdk to level 34:

compileSdk 34

Update core-light dependency to the latest version

implementation 'com.incode.sdk:core-light:2.6.4'

Deprecated APIs

The following methods have been deprecated and will be removed in a future release:

VideoSelfie.Builder.setAssistedOnboardingEnabled()
VideoSelfie.Builder.setAssistedOnboardingEnabled()

Transition to the New Video Selfie UI Experience

With the introduction of the new Video Selfie UI experience and the removal of the old Video Selfie UI, certain string resources from strings.xml and JSON animation files have been removed. If you had previously customized the Video Selfie and Video Selfie Tutorial screens, please remove your customizations for the following resources:

Video Selfie Tutorial Screen

<string name="onboard_sdk_video_selfie_tip_title">Let’s record a video</string>
<string name="onboard_sdk_video_selfie_tip_subtitle">Follow the instructions during the video</string>
<string name="onboard_sdk_video_selfie_tip_btn_continue">@string/onboard_sdk_btn_continue</string>
onboard_sdk_lottie_tutorial_video_selfie.json

Video Selfie Screen

<string name="onboard_sdk_video_selfie_show_document_label_highlighted_part">Proof of Address</string>
<string name="onboard_sdk_video_selfie_show_document_label">Show your Proof of Address and then press Continue</string>
<string name="onboard_sdk_video_selfie_instructions_questions">We need you to verbally confirm that you accept the terms</string>
<string name="onboard_sdk_video_selfie_bottom_feedback_questions">Once you’ve answered, tap Continue:</string>\
<string name="onboard_sdk_video_selfie_bottom_feedback_voice_consent">Once you’ve accepted, tap Continue:</string>

Update string resources

The following string has been used for the Review Your Photo screen subtitle:

<string name="onboard_sdk_review_your_photo_subtitle">Make sure the letters are clear and it has good lighting</string>

It's replaced with two new strings:

<string name="onboard_sdk_review_your_photo_hint1">Ensure that the text on the ID is readable</string>
<string name="onboard_sdk_review_your_photo_hint2">The ID photo must be sharp and without glare</string>

Deprecated styles

The following style has been deprecated:

onboard_sdk_ScanFeedbackText

To maintain backward compatibility, it has been replaced with:

onboard_sdk_ScanFeedbackTextSmall

If you use any of following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:kiosk-login:1.3.5'
implementation 'com.incode.sdk:nfc:1.3.5'
implementation 'com.incode.sdk:qr-face-login:1.2.3'

The vertical style of the Help screen in the IdScan module has been removed. The following customization will no longer work, and can be removed:

<item name="onboard_sdk_need_help_vertical" type="bool">true</item>

Welcome SDK Migration from V5.0.0 to 5.26.3-compat

This compat release was introduced for projects that couldn't upgrade from 4.X.X to 5.0.0 due to the RxJava version used internally. As such, the path to migrate to 5.26.3-compat includes all the notes from 5.0.0 through 5.26.2-compat, with the following exceptions.

If you use any of following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:kiosk-login:1.3.4.1-compat'
implementation 'com.incode.sdk:nfc:1.3.4.1-compat'
implementation 'com.incode.sdk:qr-face-login:1.2.2.1-compat'

Welcome SDK Migration from V5.21.0 to 5.26.2-compat

The compat versions of Incode Welcome SDK dependencies were introduced for projects that couldn't upgrade from 5.21.0 to 5.22.0 due to the Kotlin version upgrade from 1.6.21 to 1.8.10. As such, the path to migrate to 5.26.2-compat includes all the notes from 5.22.0 until now, with the following exceptions.

1. Update core-light dependency to the latest version

implementation 'com.incode.sdk:core-light:2.6.3'

2. If you use any of following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:kiosk-login:1.3.4-compat'
implementation 'com.incode.sdk:nfc:1.3.4-compat'
implementation 'com.incode.sdk:qr-face-login:1.2.2-compat'
implementation 'com.incode.sdk:video-streaming:1.5.5'

Note: If Android Studio shows a warning about nfc 1.3.4 or qr-face-login 1.2.2 being available, these can be safely ignored.

Welcome SDK Migration from V5.26.0 to 5.26.2-compat

As the compat versions of Incode Welcome SDK dependencies are only intended for projects that can't use at least Kotlin 1.8.10, there's no need for anyone using 5.26.0 to upgrade to 5.26.2-compat. All relevant changes will be included in 5.27.0.

Note: If Android Studio shows a warning about a new version, 5.26.2-compat being available, that can be safely ignored.

Welcome SDK Migration from V5.25.0 to 5.26.0

If you use any of following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:nfc:1.3.4'
implementation 'com.incode.sdk:qr-face-login:1.2.2'
implementation 'com.incode.sdk:kiosk-login:1.3.3'

Changes in behavior

IdScan and SelfieScan modules

Old behavior:

  • Denying Camera or Microphone permissions in IdScan and SelfieScan modules results in an onUserCancelled() callback.

New behavior:

  • Denying Camera or Microphone permissions in IdScan and SelfieScan modules now results in an onError(PermissionDeniedException()) callback.

Changes to video-streaming

This release now requires a device to have more than 2GB of RAM to use video-streaming. If a device has exactly 2GB of RAM or less, and streamFrames is enabled, the setting will be ignored.

API Changes

The following field's type was changed from String to String? (nullable): CurpValidationResult.curp.

Deprecated APIs

The following methods have been deprecated and will be removed in a future release:

IncodeWelcome.fetchAllFlows(@NonNull String token, FetchFlowsListener fetchFlowsListener)
IncodeWelcome.fetchFlow(String flowId, String token, FetchFlowListener fetchFlowListener)
IncodeWelcome.fetchAllFlows(token: String, fetchFlowsListener: FetchFlowsListener?)
IncodeWelcome.fetchFlow(flowId: String?, token: String?, fetchFlowListener: FetchFlowListener?)

Welcome SDK Migration from V5.24.0 to 5.25.0

1. Update core-light dependency to the latest version

implementation 'com.incode.sdk:core-light:2.6.3'

2. If you use any of following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:nfc:1.3.3'
implementation 'com.incode.sdk:qr-face-login:1.2.1'
implementation 'com.incode.sdk:kiosk-login:1.3.2'

3. Update string resources

The following strings have been used for the Exit Confirmation dialog buttons, as well as for a couple of other screens:

<string name="onboard_sdk_results_yes">Yes</string>
<string name="onboard_sdk_results_no">No</string>

The yes/no strings for the Exit Confirmation dialog buttons have now been replaced with the following strings:

<string name="onboard_sdk_exit_dialog_positive_button">Quit</string>
<string name="onboard_sdk_exit_dialog_negative_button">Get back</string>

If you customized the Exit Confirmation dialog buttons, please update your customizations to the new strings.

Deprecated APIs

The following methods have been deprecated and will be removed in a future release:

IncodeWelcome.fetchRegions(FetchRegionsListener fetchRegionsListener)
SessionConfig.Builder.setRegionIsoCode(String regionIsoCode)
IncodeWelcome.downloadLibraries()
IncodeWelcome.isLibrariesReady() // Always returns true
IncodeWelcome.subscribeForLibrariesReady(FaceRecognitionPrepareListener faceRecognitionReadyListener)
IncodeWelcome.fetchRegions(fetchRegionsListener: FetchRegionsListener)
SessionConfig.Builder.setRegionIsoCode(regionIsoCode: String)
IncodeWelcome.downloadLibraries()
IncodeWelcome.isLibrariesReady() // Always returns true
IncodeWelcome.subscribeForLibrariesReady(faceRecognitionReadyListener: FaceRecognitionPrepareListener?)

Changes to OnboardingSessionListener

The region argument in onOnboardingSessionCreated(String token, String interviewId, String region) method is being deprecated. The value of region is now always "ALL". This argument will be removed in a future release.

Welcome SDK Migration from V5.23.0 to V5.24.0

If you use any of following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:nfc:1.3.2'
implementation 'com.incode.sdk:qr-face-login:1.2.0'

Changes in behavior

Geolocation module

Old behavior:

  • Denying Geolocation permission in Geolocation module results in onUserCancelled() callback.

New behavior:

  • Denying Geolocation permission in Geolocation module now results in onError(PermissionDeniedException()) callback.

Changes to CommonConfig

For configuring auto-capture timeouts in the IdScan and SelfieScan modules, replace the methods that were removed:

CommonConfig.Builder.setIdAutoCaptureTimeout()
CommonConfig.Builder.setSelfieAutoCaptureTimeout()
CommonConfig.Builder.setIdAutoCaptureTimeout()
CommonConfig.Builder.setSelfieAutoCaptureTimeout()

With the following methods:

IdScan.Builder.setIdAutoCaptureTimeout()
SelfieScan.Builder.setSelfieAutoCaptureTimeout()
IdScan.Builder.setIdAutoCaptureTimeout()
SelfieScan.Builder.setSelfieAutoCaptureTimeout()

Note that these methods are now parts of the respective modules' configurations.

Changes to ScreenName class

Renamed constants:

GEOLOCATION_PERMISSIONS_EXPLAINED -> GEOLOCATION
GEOLOCATION_PERMISSIONS_DIALOGUE -> GEOLOCATION_PERMISSION_MANDATORY_DIALOG
VIDEO_SELFIE_VOICE_CONSENT_PERMISSION_DIALOGUE -> MICROPHONE_PERMISSION_MANDATORY_DIALOG,

Deleted (unused) constants:

FRONT_ID_CAMERA_PERMISSIONS
BACK_ID_CAMERA_PERMISSIONS
DOCUMENT_CAPTURE_CAMERA_PERMISSIONS
VIDEO_SELFIE_PERMISSIONS_DIALOGUE

New constants:

CAMERA_PERMISSION_MANDATORY_DIALOG

Welcome SDK Migration from V5.21.0 to V5.22.0

1. If you use any of following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:nfc:1.3.1'
implementation 'com.incode.sdk:video-streaming:1.5.5'

Welcome SDK Migration from V5.20.0 to V5.21.0

1. Update core-light dependency to the latest version

implementation 'com.incode.sdk:core-light:2.6.2'

2. If you use any of the following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:nfc:1.3.0'
implementation 'com.incode.sdk:kiosk-login:1.3.1'

Welcome SDK Migration from V5.18.0 to V5.20.0

1. Update core-light dependency to the latest version

implementation 'com.incode.sdk:core-light:2.6.1'

2. If you use any of the following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:nfc:1.2.1'

Welcome SDK Migration from V5.17.2 to V5.18.0

1. Update core-light dependency

Replace

implementation 'com.incode.sdk:core-light:2.5.1'

With

implementation 'com.incode.sdk:core-light:2.6.0'

2. If you use any of the following optional dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:kiosk-login:1.3.0'
implementation 'com.incode.sdk:model-face-recognition:3.0.0'
implementation 'com.incode.sdk:model-id-face-detection:2.1.0'
implementation 'com.incode.sdk:model-liveness-detection:3.0.0'
implementation 'com.incode.sdk:nfc:1.2.0'

3. Updates to Face Mask checks

The model dependency previously required for performing face mask checks is now incorporated into core-light:2.6.0. As such, model-mask-detection is no longer required and should be removed.

Similarly, face mask checks no longer have a configurable threshold or variable confidence level. Any usage of the following APIs should be removed:

  • CommonConfig.getMaskThreshold()
  • CommonConfig.Builder.setMaskThreshold()
  • SelfieScanResult.maskConfidence

Welcome SDK Migration from V5.17.0 to V5.17.2

1. Update core-light dependency

Replace

implementation 'com.incode.sdk:core-light:2.5.0'

With

implementation 'com.incode.sdk:core-light:2.5.1'

2. Update video-streaming dependency

Replace

implementation 'com.incode.sdk:video-streaming:1.5.3'

With

implementation 'com.incode.sdk:video-streaming:1.5.4'

Welcome SDK Migration from V5.16.0 to V5.17.0

1. If you use any of the following dependencies, make sure to update to the latest versions

implementation 'com.incode.sdk:nfc:1.1.0'
implementation 'com.incode.sdk:kiosk-login:1.2.0'
implementation 'com.incode.sdk:qr-face-login:1.1.0'

2. If you are using the conference dependency

Replace

implementation 'com.incode.sdk:conference:1.5.2'

With

implementation 'com.incode.sdk:video-streaming:1.5.3'

3. Updates to External Analytics

External analytics (for screens outside of the Incode SDK) is no longer being controlled using the IncodeWelcome.Builder.setLoggingEnabled() method. It now has its own separate methods:

IncodeWelcome.Builder.setExternalAnalyticsEnabled() enables or disables collecting analytics events for screens outside of the Incode SDK. Default value is true.

IncodeWelcome.Builder.setExternalScreenshotsEnabled() enables or disables collecting screenshots of screens outside of the Incode SDK. External Analytics must be enabled for this configuration to take effect. Default value is false.

To change the default behavior, please use the new APIs.

Welcome SDK Migration from V5.14.0 to V5.15.0

1. Update core-light dependency

Replace

implementation 'com.incode.sdk:core-light:2.4.0'

With

implementation 'com.incode.sdk:core-light:2.5.0'

2. Update kiosk-login dependency

Replace

implementation 'com.incode.sdk:kiosk-login:1.0.0'

With

implementation 'com.incode.sdk:kiosk-login:1.1.0'

Welcome SDK Migration from V5.12.0 to V5.13.0

1. Update core-light dependency

Replace

implementation 'com.incode.sdk:core-light:2.3.0'

With

implementation 'com.incode.sdk:core-light:2.4.0'

2. ID side detection is bundled with the latest version of ID validation model, so the following dependency is no longer necessary:

implementation 'com.incode.sdk:model-id-face-detection:2.0.0'

If present, please remove it from your build.gradle.

Welcome SDK Migration from V5.11.0 to V5.12.0

Changes to VerifyListener

onError() method of the VerifyListener now receives a Throwable error as an argument, so you can see the actual exception that has been thrown.

If you are using VerifyListener in your code:

Replace

override fun onError() {}
@Override
public void onError() {}

With

override fun onError(error: Throwable?) {}
@Override
public void onError(Throwable error) {}

Welcome SDK Migration from V5.X.X to V5.8.0

1. Update core-light dependency

Replace

implementation 'com.incode.sdk:core-light:2.2.0'

With

implementation 'com.incode.sdk:core-light:2.3.0'

2. Face detector that detects faces on ID was moved to a new dependency.

If any of the following methods are used,

IdScan.Builder.setEnabledFrontShownAsBackCheck(true)
IdScan.Builder.setEnableBackShownAsFrontCheck(true)
IdScan.Builder.setEnabledFrontShownAsBackCheck(true)
IdScan.Builder.setEnableBackShownAsFrontCheck(true)

make sure to add the following line to your module-level app/build.gradle

implementation 'com.incode.sdk:model-id-face-detection:2.0.0'

3. Time unit for setting the maximum length of a video selfie recording changed from minutes to seconds.

Replace:

VideoSelfie.Builder.setMaxVideoLength(X)
VideoSelfie.Builder.setMaxVideoLength(X)

With:

VideoSelfie.Builder.setMaxVideoLength(X * 60)
VideoSelfie.Builder.setMaxVideoLength(X * 60)

Welcome SDK Migration from V4.X.X to V5.0.0

Removed APIs

The following APIs have been removed:

createNewOnboardingSession()
setOnboardingSession()
createNewOnboardingSession()
setOnboardingSession()

Use this new API for both cases:

// Use this API to resume existing session or to perform setup when using startOnboardingSection() API
setupOnboardingSession()
// Use this API to resume existing session or to perform setup when using startOnboardingSection() API
setupOnboardingSession()

Removed Configs

The following classes have been removed:

OnboardingConfigV2
OnboardingFlowConfig
OnboardingConfigV2
OnboardingFlowConfig

Instead, you can use these:

SessionConfig // Session related configuration: region, interviewId, configurationId, validationModuleList, externalId, externalToken, customFields.
FlowConfig // Flow or Module related configuration; You can add modules through this config.
CommonConfig // SDK wide configuration: thresholds, UI behaviors
SessionConfig // Session related configuration: region, interviewId, configurationId, validationModuleList, externalId, externalToken, customFields.
FlowConfig // Flow or Module related configuration; You can add modules through this config.
CommonConfig // SDK wide configuration: thresholds, UI behaviors

Removed callback methods

The following method has been removed:

VideoSelfieListener.onVideoRecorded()
VideoSelfieListener.onVideoRecorded()

Instead, use this method:

VideoSelfieListener.onVideoRecorded(videoSelfieResult: VideoSelfieResult)
VideoSelfieListener.onVideoRecorded(VideoSelfieResult videoSelfieResult)

Changed or renamed APIs

startOnboardingV2()

The V2 has been removed from the API method and class names.

  • startOnboardingV2() becomes startOnboarding
  • OnboardingListenerV2 becomes OnboardingListener

Use SessionConfig and FlowConfig instead of OnboardingConfigV2.

// Old
startOnboardingV2(context: Context, onboardingConfig: OnboardingConfigV2, onboardingListener: OnboardingListenerV2)

// New
startOnboarding(context: Context, sessionConfig: SessionConfig, flowConfig: FlowConfig, onboardingListener: OnboardingListener)
// Old
startOnboardingV2(Context context, OnboardingConfigV2 onboardingConfig, OnboardingListenerV2 onboardingListener)

// New
startOnboarding(Context context, SessionConfig sessionConfig, FlowConfig flowConfig, OnboardingListener onboardingListener)

startOnboardingSection()

The argument interviewId has been removed from the startOnboardingSection() method. interviewId is set internally when setupOnboardingSession() is called. Make sure to call setupOnboardingSession() prior to calling startOnboardingSection().

// Old
startOnboardingSection(context: Context, interviewId: String, onboardingFlowConfig: OnboardingFlowConfig, onboardingListenerV2: OnboardingListenerV2)

// New
startOnboardingSection(context: Context, flowConfig: FlowConfig, onboardingListener: OnboardingListener)
// Old
startOnboardingSection(Context context, String interviewId, OnboardingFlowConfig onboardingFlowConfig, OnboardingListenerV2 onboardingListenerV2)

// New
startOnboardingSection(Context context, FlowConfig flowConfig, OnboardingListener onboardingListener)

Examples of how to use the new Configs

Example: Create a SessionConfig:

val sessionConfigBuilder: SessionConfig.Builder = SessionConfig.Builder()

sessionConfigBuilder.setRegion(...)
sessionConfigBuilder.setConfigurationId(...)
sessionConfigBuilder.setCustomFields(...)
sessionConfigBuilder.setQueueName(..)

val sessionConfig: SessionConfig = sessionConfigBuilder.build()
SessionConfig.Builder sessionConfigBuilder = new SessionConfig.Builder();

sessionConfigBuilder.setRegion(...);
sessionConfigBuilder.setConfigurationId(...);
sessionConfigBuilder.setCustomFields(...);
sessionConfigBuilder.setQueueName(...);

SessionConfig sessionConfig = sessionConfigBuilder.build();

Example: Create a FlowConfig:

val flowConfigBuilder: FlowConfig.Builder = FlowConfig.Builder()

val intro: Intro = Intro.Builder()
        .setIntroChecks(...)
        .setAllowContinueWithoutConsent(...)
        .build()

flowConfigBuilder.addIntro(intro)
flowConfigBuilder.addPhone()

val idScan: IdScan = IdScan.Builder()
        .setShowIdTutorials(...)
        .setWaitForTutorials(...)
        .setEnableFrontShownAsBackCheck(...)
        .build()

flowConfigBuilder.addID(idScan)

val flowConfig: FlowConfig = flowConfigBuilder.build()
FlowConfig.Builder flowConfigBuilder = new FlowConfig.Builder();

Intro intro = new Intro.Builder()
        .setIntroChecks(...)
        .setAllowContinueWithoutConsent(...)
        .build();

flowConfigBuilder.addIntro(intro);
flowConfigBuilder.addPhone();

IdScan idScan = new IdScan.Builder()
        .setShowIdTutorials(...)
        .setWaitForTutorials(...)
        .setEnableFrontShownAsBackCheck(...)
        .build();

flowConfigBuilder.addID(idScan);

FlowConfig flowConfig = flowConfigBuilder.build();

Example: Create a CommonConfig:

val commonConfig: CommonConfig = CommonConfig.Builder()
        .setShowExitConfirmation(...)
        .setShowCloseButton(...)
        .setIdGlareThreshold(...)
        .setIdBlurThreshold(...)
        .build()

IncodeWelcome.getInstance().setCommonConfig(commonConfig)
CommonConfig commonConfig = new CommonConfig.Builder()
        .setShowExitConfirmation(...)
        .setShowCloseButton(...)
        .setIdGlareThreshold(...)
        .setIdBlurThreshold(...)
        .build();

IncodeWelcome.getInstance().setCommonConfig(commonConfig);

The following method has been removed in this release:

OnboardingConfigV2.setShowReviewPhoto(showReviewPhoto: Boolean)
OnboardingConfigV2.setShowReviewPhoto(boolean showReviewPhoto)

Instead, use the following method in the IdScan config builder:

val idScan: IdScan = IdScan.Builder()
        ...
        .setShowRetakeScreen(showRetakeScreen: Boolean)
        .build()
IdScan idScan = new IdScan.Builder()
        ...
        .setShowRetakeScreen(boolean showRetakeScreen)
        .build();
OnboardingConfigV2.setShowReviewPhoto(boolean showReviewPhoto)
OnboardingConfigV2.setShowReviewPhoto(showReviewPhoto: Boolean)

Instead, use the following method in the IdScan config builder:

IdScan idScan = new IdScan.Builder()
        ...
        .setShowRetakeScreen(boolean showRetakeScreen)
        .build();
val idScan: IdScan = IdScan.Builder()
        ...
        .setShowRetakeScreen(showRetakeScreen: Boolean)
        .build()