SDK reference, React Native SDK

Customization

The React Native SDK supports customization of text, localization, icons, videos, and visual themes. The available options and the methods used to apply them differ between Android and iOS for legacy (v1) screens - see the platform-specific sections below.

Android

The following covers v1 customization options for legacy screens. For v2 customization, see the intro above.

Customization options

  • Text and localization: Override SDK strings and add languages.
  • Icons and videos: Replace SDK assets with your own.
  • Theme (ID Scan V2 only): setTheme() on Android currently supports customization exclusively for the ID Scan V2 feature.

For configuration details, see the full Android customization guide.

Method examples

To set the runtime localization language, call setLocalizationLanguage(). Supported values are currently en, es, and pt:

await IncodeSdk.setLocalizationLanguage('en');

To override an individual string, call setString():

IncodeSdk.setString({
  onboard_sdk_btn_passport: 'Passport',
});

To localize plural strings, call setQuantityStrings():

await IncodeSdk.setQuantityStrings(
  'en',
  {
    onboard_sdk_validation_attempts_remaining: {
      one: "%d attempt remaining",
      other: "%d attempts remaining"
    }
  }
);

Dependency requirements

The setLocalizationLanguage, setString, and setQuantityStrings methods require the Android extensions dependency:

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

iOS

The following covers v1 customization options for legacy screens. For v2 customization, see the intro above.

Customization options

  • Icons and videos: Replace SDK assets with your own.
  • Text and localization: Override SDK strings and add languages.
  • Theme: Customize colors, fonts, buttons, and other components.

For configuration details, see the full iOS customization guide.

Method examples

setLocalizationLanguage() and setString() are also available on iOS, with the same behavior as Android.

setQuantityStrings() applies plural string overrides on Android only. The method exists on iOS for API compatibility but is currently a no-op—it resolves successfully without applying anything.

To change the theme, call setTheme with a stringified theme JSON:

const jsonTheme = JSON.stringify({
  colors: {
    accent: '#00B2FD',
    primary: '#20263D',
    background: '#FFFFFF',
  },
  // See the iOS customization guide for the full theme schema.
});

IncodeSdk.setTheme({ theme: jsonTheme })

Dependency requirements

Unlike on Android, no additional native dependency is required for setLocalizationLanguage, setString, or setQuantityStrings on iOS.

ID v2 Customization

Both platforms support the customization of ID v2 experience via IncodeSdk.setTheme({ theme }).

To show your logo on the SDK screens, call setLogo with the name of an image of your app:

await IncodeSdk.setLogo({ logo: 'my_logo' });

The logo shows on every UX V2 screen, such as FaceAuthentication, and on the legacy screens.

On Android, the name is a drawable resource name. On iOS, it is an image asset name. A logo set on the SelfieScan or VideoSelfie module has priority in that module. For the details, see setLogo in the API Reference.

On Android, the logo is a resource image. Add it to res/raw/keep.xml, or the Android shrinker removes it from release builds:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
    tools:keep="@drawable/my_logo" />

Was this page helpful?