# Migration Guide version 5+

## Welcome SDK Migration from V5.45.0 to 5.45.1

> If you are managing dependency versions manually (without the BOM), refer to the Module Versions section in the [CHANGELOG](doc:changelog) for the updated version numbers.

## Welcome SDK Migration from V5.44.0 to 5.45.0

> If you are managing dependency versions manually (without the BOM), refer to the Module Versions section in the [CHANGELOG](doc:changelog) for the updated version numbers.

### 1. Updates to document chooser behavior in `IdScan` module

The visibility of the document chooser screen is now controlled only by the "Show document chooser screen" flag on the Dashboard or `setShowIdTypeChooser(...)` in the SDK.
    * When using startFlow / startWorkflow, the Dashboard setting is respected.
    * When using startOnboarding / startOnboardingSection, the Dashboard setting is ignored and visibility is controlled exclusively via setShowIdTypeChooser(...).
Setting `idType` alone no longer hides the chooser and will be ignored.

If you previously pre-set `idType` (either using `builder.setIdType(...)` in the SDK or via the Dashboard) and expected the chooser to be hidden, you must now explicitly disable it or update the Flow configuration accordingly:

```kotlin
IdScan.Builder()
    .setIdType(IdScan.IdType.ID)
    .setShowIdTypeChooser(false)
    .build()
```
```java
new IdScan.Builder()
    .setIdType(IdScan.IdType.ID)
    .setShowIdTypeChooser(false)
    .build();
```

### 2. Color palette changes

If you previously customized the application appearance by updating these colors from the color palette:

```kotlin
IncodeWelcome
    .getInstance()
    .setCommonConfig(
        CommonConfig.Builder()
            .setThemeConfig(
                IncodeThemeConfig(
                    colorPalette = IncodeColorPalette(
                        negative500 = Color(0xffff5a5f),
                        negative600 = Color(0xffe71111),
                        positive500 = Color(0xff189f60),
                        positive600 = Color(0xff189f60)
                    )
                )
            )
            .build()
    )
```

or using a config JSON:

```json
{
    "colorPalette": {
        "negative500": "#FF5A5F",
        "negative600": "#E71111",
        "positive500": "#189F60",
        "positive600": "#189F60"
    }
}
```

These keys have now been migrated to the following values:
* `negative500` -> `negative400`
* `negative600` -> `negative500`
* `positive500` -> `positive400`
* `positive600` -> `positive500`

The mentioned colors are used for the following Color Modes:
* `Icon/Status/Negative`
* `Icon/Status/Positive`
* `Surface/Status/Positive`
* `Border/Status/Negative Static`
* `Border/Status/Positive Static`

### 3. `ID Capture` V2 - Error Screen Customization

**Wrong document side customization:**

If you previously customized the `Wrong document side` error screen, add the following new string resources:

**Add these strings:**
```xml
<string name="onboard_sdk_id_capture_error_side_front">Capture the front side of the ID</string>
<string name="onboard_sdk_id_capture_error_side_back">Capture the back side of the ID</string>
```

**Previous string:**
```xml
<string name="onboard_sdk_id_capture_error_side">You’ve scanned the wrong document side. Please scan your document again.</string>
```

This string is no longer used.

**No internet connection customization:**

If you previously customized the `No internet connection` error screen, add the following new string resource:

**Add this string:**
```xml
<string name="onboard_sdk_no_internet_title">No internet connection</string>
```

**Previous string:**
```xml
<string name="onboard_sdk_id_capture_error_title">There was a problem</string>
```

The previously used string is still in use for other error screens and should be kept in your resources.

**Retry button customization:**

The retry button is now customized using a different string resource:

```xml
<string name="onboard_sdk_id_capture_retry">Refresh</string>
```

**Previous string:**
```xml
<string name="onboard_sdk_no_network_snackbar_action_text">Retry</string>
```

The previously used string is still in use for other error screens and should be kept in your resources.

### 4. `Selfie` V2 - Error Screen Customization

**No internet connection customization:**

If you previously customized the `No internet connection` error screen, add the following new string resource:

**Add this string:**
```xml
<string name="onboard_sdk_no_internet_title">No internet connection</string>
```

**Previous string:**
```xml
<string name="onboard_sdk_face_scan_failed_feedback_selfie_capture_failed_title">There was a problem</string>
```
The previously used string is still in use for other error screens and should be kept in your resources.

#### 5. Changes in behavior for device environment detection

The behavior when detecting device environment vulnerabilities has changed:

* **Hook or virtual environment detection**: Detecting hook or virtual environment vulnerabilities in the SDK triggers a native crash, which cannot be caught or handled by application code, resulting in immediate app termination.
* **Emulator and root detection**: The flow is not aborted when emulator and root checks are detected. The onboarding process continues normally.

### 6. API Changes

#### 6.1 The following `IncodeWelcome.Builder` methods have been removed

```kotlin
IncodeWelcome.Builder.disableVirtualEnvironmentDetection()
IncodeWelcome.Builder.disableRootDetection()
IncodeWelcome.Builder.disableEmulatorDetection()
IncodeWelcome.Builder.disableHookCheck()
```

```java
IncodeWelcome.Builder.disableVirtualEnvironmentDetection()
IncodeWelcome.Builder.disableRootDetection()
IncodeWelcome.Builder.disableEmulatorDetection()
IncodeWelcome.Builder.disableHookCheck()
```

If you were using these methods in your code, remove them from your `IncodeWelcome.Builder` configuration as device environment checks can no longer be disabled.

#### 6.2 The following exceptions have been removed

The following specific exceptions that extended `DeviceEnvironmentException` have been removed:

```kotlin
com.incode.welcome_sdk.commons.exceptions.IncodeException.EmulatorDetectedException
com.incode.welcome_sdk.commons.exceptions.IncodeException.RootDetectedException
com.incode.welcome_sdk.commons.exceptions.IncodeException.HookDetectedException
com.incode.welcome_sdk.commons.exceptions.IncodeException.VirtualEnvironmentDetectedException
```

If you were checking for these `Exceptions` in your code, remove any specific handling of them as your app will no longer get this direct feedback.

### 7. Expected crashes when running in a virtual environment

It is expected that the app crashes with the following stacktraces when a virtual environment is used. For example:

```
java.lang.NullPointerException
	at com.incode.welcome_sdk.ThemeConfiguration$Builder.setLabelSmallStyle(SourceFile:1066)
	at com.incode.welcome_sdk.f.c(SourceFile:150)
	at com.incode.welcome_sdk.data.local.m.as(SourceFile:22)
	at com.incode.welcome_sdk.IncodeWelcome.startOnboardingSection(SourceFile:18)
```

```
java.lang.NullPointerException: Attempt to get length of null array
	at com.incode.welcome_sdk.data.IncodeWelcomeRepository.d(SourceFile:320)
	at com.incode.welcome_sdk.data.IncodeWelcomeRepository.i(SourceFile:214)
```

### 8. `Selfie` V2 - No Internet Error Screen Retry Button Change

**Retry button customization:**

The retry button label shown on the Selfie Scan no internet error screen now uses a dedicated string resource:

```xml
<string name="onboard_sdk_face_scan_retry">Refresh</string>
```

**Previous string:**
```xml
<string name="onboard_sdk_try_again">Try again</string>
```

If you override `onboard_sdk_try_again` to customize the retry button on the no internet screen, you must now override `onboard_sdk_face_scan_retry` instead. 
The `onboard_sdk_try_again` string is still used for other retry scenarios.

### 9. `Selfie` V2 - Capture-Only Mode Success Screen Text Change

**Success label customization:**

In capture-only mode, the Selfie Scan success screen now uses a different string resource:

```xml
<string name="onboard_sdk_face_captured">Face captured!</string>
```

**Previous string:**
```xml
<string name="onboard_sdk_enroll_success">Success!</string>
```

The previously used string is still in use for non-capture-only mode and should be kept in your resources.

### 7. `ID Capture` and `Selfie` V2 - Permission Open Settings Screen Text Change

**Open settings button customization:**

The Open settings label shown on the Permission open settings screen now uses a dedicated string resource:

```xml
<string name="onboard_sdk_permission_allow_permission_action">Allow permission</string>
```

**Previous string:**
```xml
<string name="onboard_sdk_permission_open_setting_action">Open settings</string>
```

The previously used string is still in use for the `Geolocation` module and should be kept in your resources.

## Welcome SDK Migration from V5.43.0 to 5.44.0

### 1. Upgrade dependencies

#### Consider migrating to the Incode BOM

To help facilitate easier version upgrades, 5.44.0 introduces the Incode Bill of Materials (BOM). This can be used to upgrade all relevant Incode library dependencies from one place instead of multiple steps to upgrade library dependency versions. To get started,

Replace:

```groovy
implementation 'com.incode.sdk:welcome:5.43.0'
implementation 'com.incode.sdk:core-light:3.0.7'
```
```kotlin
implementation("com.incode.sdk:welcome:5.43.0")
implementation("com.incode.sdk:core-light:3.0.7")
```

With:

```groovy
implementation platform('com.incode.sdk:bom:5.44.0')
implementation 'com.incode.sdk:welcome'
implementation 'com.incode.sdk:core-light'
// Plus any other Incode SDK dependencies... (without the version numbers)
```
```kotlin
implementation(platform("com.incode.sdk:bom:5.44.0"))
implementation("com.incode.sdk:welcome")
implementation("com.incode.sdk:core-light")
// Plus any other Incode SDK dependencies... (without the version numbers)
```

See the [Incode Bill of Materials (BOM) section of the Setup Guide](https://developer.incode.com/docs/setup-android#incode-bill-of-materials-bom) for more info.

#### or, Upgrade dependencies manually

If you prefer to continue updating all dependencies manually, be sure to update `welcome` as usual:

```groovy
implementation 'com.incode.sdk:welcome:5.44.0'
```
```kotlin
implementation("com.incode.sdk:welcome:5.44.0")
```

and update the `core-light` dependency to the latest version:

```groovy
implementation 'com.incode.sdk:core-light:3.0.8'
```
```kotlin
implementation("com.incode.sdk:core-light:3.0.8")
```

{/* 

TODO: Keep this stub if it'll actually be used.
Also, if you use any of the following optional dependencies, make sure to update to the latest versions:

```groovy
implementation 'com.incode.sdk:nfc:x.x.x'
```
```kotlin
implementation("com.incode.sdk:nfc:x.x.x")
```

*/}

### 2. Upload Digital ID V2

**Upload error screen customization:**

If you previously customized the upload error screen, add the following new string resource:

**Add this string:**
```xml
<string name="onboard_sdk_validation_error_button_text">Scan your ID</string>
```

**Previous string:**
```xml
<string name="onboard_sdk_id_capture_tutorial_title">Scan your ID</string>
```

This string is now used only for customizing the ID Capture V2 tutorial screen title.

### 3. DocumentType has moved

The `DocumentType` class has been moved from the `com.incode.welcome_sdk.ui.camera.id_validation.base` package
to `com.incode.welcome_sdk.data`.

Replace the following `import` statement

```kotlin
com.incode.welcome_sdk.ui.camera.id_validation.base.DocumentType
```

with

```kotlin
com.incode.welcome_sdk.data.DocumentType
```

### 4. Package name change: `selfie_scan` renamed to `selfie_capture`

The package name `selfie_scan` has been renamed to `selfie_capture`.

Update all imports from `com.incode.welcome_sdk.ui.selfie_scan.*` to `com.incode.welcome_sdk.ui.selfie_capture.*` throughout your codebase.

This change was required due to DexGuard constraints around package naming and obfuscation.

### 5. Transition/Loading screen removed

The transition/loading screen that was shown between modules has been completely removed. If your integration had any customization for this screen (e.g., overriding `onboard_sdk_activity_transition.xml`, setting `IncodeTransitionScreenState.isEnabled`, or customizing transition string resources), those customizations can be safely deleted.

### 6. Migrate any custom `ThemeConfiguration` to the V2 equivalent

If your previous integration had any UI customization in supported modules through [Theme Configuration](user-guide-customization#2-theme-configuration), these customizations will now need to be migrated to the equivalents in UXv2. See the [Migrating Theme Configurations to UXv2 Guide](user-guide-customization#7-v2-customization-guide) for more details. {/* TODO: Actually have this specific guide */}

### 7. Changed default values in `FaceMatch` module config (optional)

With the move to UxV2, the `showUserExists` config is now `false` by default.
To preserve the old behavior, you can use:

```kotlin
FaceMatch.Builder()
  .setShowUserExists(true)
  .build()
```
```java
new FaceMatch.Builder()
  .setShowUserExists(true)
  .build();
```

## Welcome SDK Migration from V5.42.0 to 5.43.0

### 1. Update core-light dependency to the latest version

```groovy
implementation 'com.incode.sdk:core-light:3.0.7'
```
```kotlin
implementation("com.incode.sdk:core-light:3.0.7")
```

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

```groovy
implementation 'com.incode.sdk:nfc:1.5.2'
```
```kotlin
implementation("com.incode.sdk:nfc:1.5.2")
```

### 3. Update string resources for the "Need Help" screen in the `IdScan` v2 module

The "Need Help" screen has been redesigned, and the customizable strings have been replaced.
If you override any of the following strings in your app, replace them with the new ones listed below.

No action is required if you do not override these strings.

#### Replaced string resources

Replace overrides of:

```xml
<string name="onboard_sdk_id_capture_help_title">Need help?</string>
<string name="onboard_sdk_id_capture_help_subtitle">Some considerations</string>
<string name="onboard_sdk_id_capture_help_manual_photo_button_text">Take the photo manually</string>
<string name="onboard_sdk_id_capture_help_align_title">Center your document in the frame</string>
<string name="onboard_sdk_id_capture_help_align_subtitle">The photo will be taken automatically</string>
<string name="onboard_sdk_id_capture_help_blur_title">Avoid blurriness on the document</string>
<string name="onboard_sdk_id_capture_help_blur_subtitle">Zoom in and out, or tap on the document</string>
<string name="onboard_sdk_id_capture_help_glare_title">Avoid glare on the document</string>
<string name="onboard_sdk_id_capture_help_glare_subtitle">Find a better lighting to avoid reflections</string>
<string name="onboard_sdk_id_capture_help_darkness_title">Avoid darkness on the document</string>
<string name="onboard_sdk_id_capture_help_darkness_subtitle">Find a place with better lighting</string>
```

with:

```xml
<string name="onboard_sdk_id_capture_common_issues_title">Common issues</string>
<string name="onboard_sdk_id_capture_common_issues_glare_title">Glare present</string>
<string name="onboard_sdk_id_capture_common_issues_glare_subtitle">Tilt the ID slightly up or down to minimize the reflection</string>
<string name="onboard_sdk_id_capture_common_issues_blur_title">Blur present</string>
<string name="onboard_sdk_id_capture_common_issues_blur_subtitle">Move ID further away or closer to your phone until the image is focused</string>
<string name="onboard_sdk_id_capture_common_issues_info_not_readable_title">Info is not readable</string>
<string name="onboard_sdk_id_capture_common_issues_info_not_readable_subtitle">Minimize camera shake by holding your phone steady</string>
<string name="onboard_sdk_id_capture_common_issues_try_again_button">@string/onboard_sdk_try_again</string>
```

### 4. API Changes

`FaceAuthenticationResult.error` type changed from `FaceAuthenticationException?` to `Throwable?` to support non-domain failures.
Consumers should no longer assume the error is a `FaceAuthenticationException`.

## Welcome SDK Migration from V5.41.0 to 5.42.0

### 1. Upgrade compileSdk

With the update of the internal CameraX dependencies, you will need to upgrade your project's `compileSdk` to level 35:

```groovy
compileSdk 35
```

### 2. Update Android Gradle Plugin (AGP)

Bumping `compileSdk` to 35 requires Android Gradle Plugin (AGP) `8.6.0` or higher.
Update your project-level `build.gradle` or `settings.gradle` file to use the new plugin version.

```groovy
classpath "com.android.tools.build:gradle:8.6.0"
```

### 3. Update Gradle Wrapper

AGP `8.6.0` requires Gradle `8.7` or higher.
Update your Gradle wrapper configuration in `gradle/wrapper/gradle-wrapper.properties`:

```properties
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
```

### 4. Update core-light dependency to the latest version

```groovy
implementation 'com.incode.sdk:core-light:3.0.6'
```

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

```groovy
implementation 'com.incode.sdk:nfc:1.5.1'
```

### 6. API changes

#### 6.1 DeviceEnvironmentException is moved and extended

The `DeviceEnvironmentException` class has been moved from the `com.incode.welcome_sdk.commons.exceptions` package
to `com.incode.welcome_sdk.commons.exceptions.IncodeException`.

Replace the following `import` statement

```kotlin
com.incode.welcome_sdk.commons.exceptions.DeviceEnvironmentException
```

with

```kotlin
com.incode.welcome_sdk.commons.exceptions.IncodeException.DeviceEnvironmentException
```

If you were catching `DeviceEnvironmentExceptions`, you can now also catch more specific exceptions that extend it:

* `EmulatorDetectedException`
* `RootDetectedException`
* `HookDetectedException`
* `VirtualEnvironmentDetectedException`

#### 6.2 PermissionsDeniedException has been replaced

Replace instances of

```kotlin
com.incode.welcome_sdk.commons.exceptions.video_selfie.PermissionsDeniedException
```

with

```kotlin
com.incode.welcome_sdk.commons.exceptions.IncodeException.PermissionNotGranted
```

#### 6.3 PermissionDeniedException has been replaced

Replace instances of

```kotlin
com.incode.welcome_sdk.commons.exceptions.PermissionDeniedException
```

with

```kotlin
com.incode.welcome_sdk.commons.exceptions.IncodeException.PermissionNotGranted
```

#### 6.4 CameraPermissionDeniedException has been replaced

Replace instances of

```kotlin
com.incode.welcome_sdk.commons.exceptions.video_selfie.CameraPermissionDeniedException
```

with

```kotlin
com.incode.welcome_sdk.commons.exceptions.IncodeException.PermissionNotGranted.CameraPermissionNotGranted
```

#### 6.5 MicrophonePermissionDeniedException has been replaced

Replace instances of

```kotlin
com.incode.welcome_sdk.commons.exceptions.video_selfie.MicrophonePermissionDeniedException
```

with

```kotlin
com.incode.welcome_sdk.commons.exceptions.IncodeException.PermissionNotGranted.RecordAudioPermissionNotGranted
```

#### 6.6 ScreenRecordingPermissionDeniedException has been replaced

Replace instances of

```kotlin
com.incode.welcome_sdk.commons.exceptions.video_selfie.ScreenRecordingPermissionDeniedException
```

with

```kotlin
com.incode.welcome_sdk.commons.exceptions.IncodeException.PermissionNotGranted.ScreenCapturePermissionNotGranted
```

#### 6.7 UnknownException has been renamed

Replace instances of

```kotlin
com.incode.welcome_sdk.commons.exceptions.IncodeException.UnknownException
```

with

```kotlin
com.incode.welcome_sdk.commons.exceptions.IncodeException.GenericException
```

#### 6.8 The following unused exceptions have been removed

```kotlin
com.incode.welcome_sdk.commons.exceptions.ApprovalForbiddenException
com.incode.welcome_sdk.commons.exceptions.ExistingSessionException
```

## Welcome SDK Migration from V5.40.x to 5.41.0

### 1. Update core-light dependency to the latest version

```groovy
implementation 'com.incode.sdk:core-light:3.0.5'
```

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

```groovy
implementation 'com.incode.sdk:nfc:1.5.0'
```

### 3. API changes

#### 3.1 Breaking change in SelfieScanListener

The `SelfieScanListener` interface has been updated to include a new method: `onSelfieScanReady(NonUiSelfieScanController)`.
This change requires all implementations of the `SelfieScanListener` interface to provide an implementation for this new method.
If you don't use non-ui mode, you can leave the method empty.
An example of build error: `does not override abstract method onSelfieScanReady(NonUiSelfieScanController) in SelfieScanListener`

## Welcome SDK Migration from V5.39.0 to 5.40.0

### 1. Update core-light dependency to the latest version

```groovy
implementation 'com.incode.sdk:core-light:3.0.4'
```

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

```groovy
implementation 'com.incode.sdk:nfc:1.4.4'
implementation 'com.incode.sdk:video-streaming:1.6.0'
implementation 'com.incode.sdk:extensions:1.2.1'
implementation 'com.incode.sdk:model-face-recognition:3.5.1'
implementation 'com.incode.sdk:model-id-face-detection:3.5.1'
implementation 'com.incode.sdk:model-liveness-detection:3.2.1'
```

### 3. minSdk changes

If you use the `video-streaming` dependency, you need to upgrade your `minSdk` to 24 or higher.
The requirement is coming from the `OpenTok` dependency, which now requires a minimum SDK version of 24.
This update is necessary to ensure compatibility with the 16KB page size support mandated by Google starting from November 1st 2025.
More info [here](https://developer.android.com/guide/practices/page-sizes).

## Welcome SDK Migration from V5.38.0 to 5.39.0

### 1. Update core-light dependency to the latest version

```groovy
implementation 'com.incode.sdk:core-light:3.0.3'
```

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

```groovy
implementation 'com.incode.sdk:extensions:1.2.0'
implementation 'com.incode.sdk:nfc:1.4.3'
```

### 3. Accessing `customerUUID` from the SDK

In previous versions, it was possible (though unintended) to access the `customerUUID` via:

```kotlin
IncodeWelcome.getInstance()
    .incodeWelcomeRepositoryComponent
    .incodeRepository
    .customerUUID
```
```java
IncodeWelcome.getInstance()
    .getIncodeWelcomeRepositoryComponent()
    .getIncodeRepository()
    .getCustomerUUID();
```

This approach relied on internal SDK APIs that were not meant to be publicly accessible and has now been removed for better encapsulation and future-proofing.

You should now obtain the `customerUUID` in the `onApproveComplete()` callback after the approval process:

```kotlin
override fun onApproveCompleted(approveResult: ApproveResult) {
    // Store the `approveResult.uuid` in your app if needed
}
```
```java
@Override
public void onApproveCompleted(ApproveResult approveResult) {
    // Store the `approveResult.uuid` in your app if needed
}
```

If your app needs to persist the `customerUUID`, it’s now your responsibility to store it in your own data layer.

### 4. Handling `metadata` from `IdScanResult` and `SelfieScanResult`

When invoking certain Incode APIs externally that use these results, providing the `metadata` is now mandatory in the following scenario:

* Deepsight is enabled.
* Capture-Only mode is being used.

The following Incode APIs require `metadata` in their request body in this scenario:

* `omni/add/front-id/v2`
* `omni/add/front-second-id/v2`
* `omni/add/back-id/v2`
* `omni/add/back-second-id/v2`
* `omni/add/face/third-party`

The `metadata` can be provided like so:

```bash
curl --request POST \
     --url https://demo-api.incodesmile.com/omni/add/face/third-party \
     --header 'X-Incode-Hardware-Id: [YOUR_TOKEN_HERE]' \
     --header 'accept: application/json' \
     --header 'api-version: 1.0' \
     --header 'content-type: application/json' \
     --header 'x-api-key: [YOUR_API_KEY_HERE]' \
     --data '
{
  "base64Image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEB...",
  "metadata": "[ENCRYPTED_STRING_RETURNED_IN_SELFIE_SCAN_RESULT]",
  "faceCoordinates": {
    "leftEyeX": 1391.01,
    "leftEyeY": 1334.62,
    "rightEyeX": 918.383,
    "rightEyeY": 1359.96,
    "leftMouthX": 918.383,
    "leftMouthY": 1359.96,
    "rightMouthX": 918.383,
    "rightMouthY": 1359.96,
    "noseTipX": 918.383,
    "noseTipY": 1359.96,
    "x": 448,
    "y": 778,
    "width": 1366,
    "height": 1366
  }
}
'
```

### 5. Handling the version of Sentry compiled into your app potentially changing

This release migrates the version of Sentry used for SDK crash reporting from the JVM variant, `io.sentry:sentry`, to the Android-specific variant, `io.sentry:sentry-android`. As such, if your app also integrates the Android-specific variant of Sentry and uses a lower version than that included in the Omni SDK (7.19.0), by default, the final app will have 7.19.0 compiled in.

### 6. New font style used `SelfieScan` V2

The following font style are added and currently used in `SelfieScan` V2:

```xml
onboard_sdk_FontFamilyBold_v2
onboard_sdk_FontFamilyMedium_v2
onboard_sdk_FontFamilyRegular_v2
```

### 7. Deprecated APIs

The `FaceInfo` methods now include an optional `FaceEventListener` parameter for callbacks, and the older versions without this parameter are deprecated.

```kotlin
IncodeWelcome.setFaces(faceInfoList: List<FaceInfo>)
IncodeWelcome.addFace(faceInfo: FaceInfo)
IncodeWelcome.removeFace(customerUUID: String)
```

```java
IncodeWelcome.setFaces(List<FaceInfo> faceInfoList);
IncodeWelcome.addFace(FaceInfo faceInfo);
IncodeWelcome.removeFace(String customerUUID);
```

Replace with:

```kotlin
IncodeWelcome.setFaces(faceInfoList: List<FaceInfo>, faceEventListener: FaceEventListener?)
IncodeWelcome.addFace(faceInfo: FaceInfo, faceEventListener: FaceEventListener?)
IncodeWelcome.removeFace(customerUUID: String, faceEventListener: FaceEventListener?)
```

```java
IncodeWelcome.setFaces(List<FaceInfo> faceInfoList, FaceEventListener faceEventListener);
IncodeWelcome.addFace(FaceInfo faceInfo, FaceEventListener faceEventListener);
IncodeWelcome.removeFace(String customerUUID, FaceEventListener faceEventListener);
```

### 8. Updated resource name

If you wanted to customize the logo at the top of the `IdScan` and `Selfie` V2 modules, you needed to override the incode logo resource: `onboard_sdk_incode_logo.xml`.
This resource was not intended to be customizable, so please update your customizations to the new resource name: `onboard_sdk_logo_header.xml`.
By default, this resource contains the Incode logo, and you can customize it to your own.

## Welcome SDK Migration from V5.37.0 to 5.38.0

### 1. Update core-light dependency to the latest version

```groovy
implementation 'com.incode.sdk:core-light:3.0.2'
```

### 2. Update string resources

The following string has been removed. If your implementation previously customized it, it's safe to remove it:

```xml
<string name="onboard_sdk_qes_checkbox_legal_binding">I would like to sign the displayed contract in a legally binding way by means of the ensuing signature procedures</string>
```

### 3. Creating a `DocumentScan` module

Prior to the introduction of `Builder` classes for configuring modules in a `FlowConfig`, it was possible to create a `DocumentScan` module object directly. This approach is now deprecated. Instead, use `DocumentScan.Builder()` to configure the `DocumentScan` module in your `FlowConfig`.

## Welcome SDK Migration from V5.36.0 to 5.37.0

### 1. Dependency removal

The `qr-face-login` dependency is no longer available and has been removed in this version of the SDK. Please update your project configuration accordingly.
Remove the `qr-face-login` dependency from your `build.gradle`:

```groovy
implementation 'com.incode.sdk:qr-face-login:version'
```

Consequently, the following components have been removed from SDK:

* The `startQrFaceLogin()` method from `IncodeWelcomeAPI`
* The `QR_FACE_LOGIN` mode from `SelfieScan.Mode`
* The `MissingQrFaceLoginDependencyException` from `com.incode.welcome_sdk.commons.exceptions`
* The `QrFaceLoginListener` from `com.incode.welcome_sdk.listeners`

### 2. Update core-light dependency to the latest version

```groovy
implementation 'com.incode.sdk:core-light:3.0.1'
```

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

```groovy
implementation 'com.incode.sdk:model-face-recognition:3.5.0'
implementation 'com.incode.sdk:model-id-face-detection:3.5.0'
```

### 4. Assisted Onboarding re-enabled for Face Capture/`SelfieScan`

Integrators that were unable to upgrade to 5.36.0 due to Assisted Onboard being disabled can now upgrade to this version. The module configurations previously affected will behave as they did prior to 5.36.0.

### 5. Removed string resources

The following strings have been removed while improving camera permission screens. Look for the `PermissionOnboarding` section in the [SDK Customization How-To Guide](https://developer.incode.com/docs/user-guide-customization#/31-override-stringsxml) for which strings are eligible for customization:

```xml
<string name="onboard_sdk_permission_main_note">Note: Depending on your phone, it may say</string>
<string name="onboard_sdk_permission_main_note_line2">OK, Allow or While using the app</string>
<string name="onboard_sdk_permission_main_note_line2_p1">OK, Allow</string>
<string name="onboard_sdk_permission_main_note_line2_p2"> or </string>
<string name="onboard_sdk_permission_main_note_line2_p3">While using the app</string>

<string name="onboard_sdk_permission_mock_dialog_title">Allow Incode to take pictures and record video?</string>
<string name="onboard_sdk_permission_mock_dialog_allow">Allow</string>
<string name="onboard_sdk_permission_mock_dialog_only_this_time">Only this time</string>
<string name="onboard_sdk_permission_mock_dialog_do_not_allow">Don\'t allow</string>

<string name="onboard_sdk_permission_camera_rationale_title">Camera permission is required to capture your document</string>
<string name="onboard_sdk_permission_rationale_confirm">Got it, allow permission</string>
<string name="onboard_sdk_permission_rationale_decline">Quit process</string>
```

## Welcome SDK Migration from V5.35.0 to 5.36.0

### 1. Dependency removal

The `camera` dependency is no longer available in this version of the SDK. This feature is now part of the `core-light` library.
Please update your project configuration accordingly to avoid duplicated classes issues at compile-time.

Remove the `camera` dependency from your `build.gradle`.

```groovy
implementation 'com.incode.sdk:camera:version'
```

### 2. Update core-light dependency to the latest version

```groovy
implementation 'com.incode.sdk:core-light:3.0.0'
```

### 3. Handling Assisted Onboarding being disabled for Face Capture/`SelfieScan`

This release temporarily disables Assisted Onboarding for the `SelfieScan` module. Because of this, the following module configurations will show no effect:

* Assisted Onboarding configuration in the Face Capture module on the Incode Dashboard
* `SelfieScan.Builder().setAssistedOnboardingEnabled()`
* `SelfieScan.Builder().setCameraFacing(CameraFacing.BACK)`

As such, for integrators dependent on Assisted Onboarding functionality, do _NOT_ upgrade to this SDK version. Assisted Onboarding for Face Capture/`SelfieScan` will be restored in a future release.

## Welcome SDK Migration from V5.34.0 to 5.35.0

### 1. Update minSdk

Support for Android 5 (API levels 21 & 22) has been dropped. Please update your `minSdk` to 23 or higher.

```groovy
minSdk 23
```

### 2. Update core-light dependency to the latest version

```groovy
implementation 'com.incode.sdk:core-light:2.7.0'
```

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

```groovy
implementation 'com.incode.sdk:camera:1.1.1'
implementation 'com.incode.sdk:nfc:1.4.1'
implementation 'com.incode.sdk:qr-face-login:1.2.6'
```

### 4. API Changes

This release has some breaking API changes of note.

#### 4.1 `ScreenRecordModule`

If you were using the `ScreenRecordModule` object in your integration, this class has been renamed to `RecordModule` to represent types of recording outside of Screen Recording coming in a future release.

Replace

```kotlin
ScreenRecordModule
```

With

```kotlin
RecordModule
```

#### 4.2 `DeviceFingerprintKt`

If you were accessing the JSON representation of the `DeviceFingerprint` via `DeviceFingerprintKt.toJSON()`, this method has been moved inside the `DeviceFingerprint` class proper.

Replace

```kotlin
DeviceFingerprintKt.toJSON()
```

With

```kotlin
DeviceFingerprint.toJSON()
```

## Welcome SDK Migration from V5.33.0 to 5.34.0

### 1. Update core-light dependency to the latest version

```groovy
implementation 'com.incode.sdk:core-light:2.6.7'
```

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

```groovy
implementation 'com.incode.sdk:nfc:1.4.0'
implementation 'com.incode.sdk:qr-face-login:1.2.5'
```

### 3. API Changes

The `deleteUserLocalData()` method has been converted to a static method. To update your code:

Replace

```kotlin
IncodeWelcome.getInstance().deleteUserLocalData()
```

With

```kotlin
IncodeWelcome.deleteUserLocalData(context)
```

## Welcome SDK Migration from V5.33.0 to 5.33.1-nu

<SpecialVersionWarning />

## Welcome SDK Migration from V5.32.0 to 5.33.0

### 1. Update core-light dependency to the latest version

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

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

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

### 3. 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`.

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

### 4. 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

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

With

```kotlin
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

```groovy
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

```groovy
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:

```groovy
compileSdk 34
```

### Update core-light dependency to the latest version

```groovy
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:

```kotlin
VideoSelfie.Builder.setAssistedOnboardingEnabled()
```
```java
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

```xml
<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

```xml
<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:

```xml
<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:

```xml
<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:

```java
onboard_sdk_ScanFeedbackText
```

To maintain backward compatibility, it has been replaced with:

```java
onboard_sdk_ScanFeedbackTextSmall
```

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

```groovy
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:

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

## Welcome SDK Migration from V5.26.0 to 5.26.2-compat

<SpecialVersionWarning />

## Welcome SDK Migration from V5.25.0 to 5.26.0

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

```groovy
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:

```java
IncodeWelcome.fetchAllFlows(@NonNull String token, FetchFlowsListener fetchFlowsListener)
IncodeWelcome.fetchFlow(String flowId, String token, FetchFlowListener fetchFlowListener)
```
```kotlin
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

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

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

```groovy
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:

```xml
<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:

```xml
<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:

```java
IncodeWelcome.fetchRegions(FetchRegionsListener fetchRegionsListener)
SessionConfig.Builder.setRegionIsoCode(String regionIsoCode)
IncodeWelcome.downloadLibraries()
IncodeWelcome.isLibrariesReady() // Always returns true
IncodeWelcome.subscribeForLibrariesReady(FaceRecognitionPrepareListener faceRecognitionReadyListener)
```
```kotlin
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 the following optional dependencies, make sure to update to the latest versions

```groovy
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:

```java
CommonConfig.Builder.setIdAutoCaptureTimeout()
CommonConfig.Builder.setSelfieAutoCaptureTimeout()
```
```kotlin
CommonConfig.Builder.setIdAutoCaptureTimeout()
CommonConfig.Builder.setSelfieAutoCaptureTimeout()
```

With the following methods:

```java
IdScan.Builder.setIdAutoCaptureTimeout()
SelfieScan.Builder.setSelfieAutoCaptureTimeout()
```
```kotlin
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 the following optional dependencies, make sure to update to the latest versions

```groovy
implementation 'com.incode.sdk:nfc:1.3.1'
```

```groovy
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

```groovy
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

```groovy
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

```groovy
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

```groovy
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

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

With

```groovy
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

```groovy
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

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

With

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

### 2. Update video-streaming dependency

Replace

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

With

```groovy
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

```groovy
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

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

With

```groovy
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

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

With

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

### 2. Update kiosk-login dependency

Replace

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

With

```groovy
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

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

With

```groovy
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:

```groovy
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

```kotlin
override fun onError() {}
```
```java
@Override
public void onError() {}
```

With

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

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

### 1. Update core-light dependency

Replace

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

With

```groovy
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,

```kotlin
IdScan.Builder.setEnabledFrontShownAsBackCheck(true)
IdScan.Builder.setEnableBackShownAsFrontCheck(true)
```
```java
IdScan.Builder.setEnabledFrontShownAsBackCheck(true)
IdScan.Builder.setEnableBackShownAsFrontCheck(true)
```

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

```groovy
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:

```kotlin
VideoSelfie.Builder.setMaxVideoLength(X)
```
```java
VideoSelfie.Builder.setMaxVideoLength(X)
```

With:

```kotlin
VideoSelfie.Builder.setMaxVideoLength(X * 60)
```
```java
VideoSelfie.Builder.setMaxVideoLength(X * 60)
```

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

### Removed APIs

The following APIs have been removed:

```kotlin
createNewOnboardingSession()
setOnboardingSession()
```
```java
createNewOnboardingSession()
setOnboardingSession()
```

Use this new API for both cases:

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

### Removed Configs

The following classes have been removed:

```kotlin
OnboardingConfigV2
OnboardingFlowConfig
```
```java
OnboardingConfigV2
OnboardingFlowConfig
```

Instead, you can use these:

```kotlin
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
```
```java
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:

```kotlin
VideoSelfieListener.onVideoRecorded()
```
```java
VideoSelfieListener.onVideoRecorded()
```

Instead, use this method:

```kotlin
VideoSelfieListener.onVideoRecorded(videoSelfieResult: VideoSelfieResult)
```
```java
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`.

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

// New
startOnboarding(context: Context, sessionConfig: SessionConfig, flowConfig: FlowConfig, onboardingListener: OnboardingListener)
```
```java
// 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()`.

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

// New
startOnboardingSection(context: Context, flowConfig: FlowConfig, onboardingListener: OnboardingListener)
```
```java
// 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`:

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

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

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

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

SessionConfig sessionConfig = sessionConfigBuilder.build();
```

Example: Create a `FlowConfig`:

```kotlin
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()
```
```java
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`:

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

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

IncodeWelcome.getInstance().setCommonConfig(commonConfig);
```

The following method has been removed in this release:

```kotlin
OnboardingConfigV2.setShowReviewPhoto(showReviewPhoto: Boolean)
```
```java
OnboardingConfigV2.setShowReviewPhoto(boolean showReviewPhoto)
```

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

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