Android React Native Wrapper

Integrate IDmission's IDentity SDK into your Android React Native application.

Prerequisites

  • React Native 0.83 or later (bare workflow or a custom dev client — not Expo Go) — React Native environment setup →
  • Node 20 or later
  • Java 17 — use JDK 17 or newer
  • minSdk 26 (Android 8.0) and compileSdk 36 — required by the IDmission native SDK
  • A physical Android device — the emulator does not support camera capture

Setup

  1. 1

    Install the module directly from GitHub with npm. No Google Drive download is required — the native module is autolinked.

    Shell
    npm install git+https://github.com/Idmission-LLC/react-native-idmission-sdk.git#v11.1.19
    The #v11.1.19 suffix pins the install to the release tag. Do not track main.
  2. 2

    Add the IDmission Maven repository to your project-level android/build.gradle. The native SDK is published to IDmission's private GitLab registry.

    android/build.gradle
    allprojects {
        repositories {
            google()
            mavenCentral()
            maven {
                url "https://gitlab.idmission.com/api/v4/projects/220/packages/maven"
                name "GitLab"
                credentials(HttpHeaderCredentials) {
                    name = "Private-Token"
                    value = "WESesyuSD9fQeqNEyig6"
                }
                authentication {
                    header(HttpHeaderAuthentication)
                }
            }
            // Required for fingerprint capture
            maven { url 'https://jitpack.io' }
        }
    }
  3. 3

    Confirm your SDK versions and multidex. Set these in android/build.gradle (ext) and your app module's android/app/build.gradle.

    android/build.gradle
    buildscript {
        ext {
            minSdkVersion = 26      // required — manifest merge fails below 26
            compileSdkVersion = 36
            targetSdkVersion = 36
        }
    }

    Ensure multidex is enabled in your app module:

    android/app/build.gradle
    android {
        defaultConfig {
            multiDexEnabled true
        }
    }
  4. 4

    Connect a physical Android device and run the application.

    Shell
    npm run android
    The IDentity SDK requires a physical device — the Android Emulator does not support camera capture and will not run the SDK flows.

Available Functions

Import the module and follow this pattern. Results for every call are delivered asynchronously through the DataCallback event.

JavaScript — usage pattern
import { IDMissionSDK, addDataCallbackListener } from 'react-native-idmission-sdk';

// 1. Subscribe to results (init, services, and submit all emit here)
const subscription = addDataCallbackListener((event) => {
  console.log('IDmission result:', event.data);
});

// 2. Initialise once before calling any service
IDMissionSDK.initializeSDK(apiBaseUrl, accessToken);

// 3. Call a service
IDMissionSDK.serviceID10();

// 4. Submit the result
IDMissionSDK.submitResult();

// 5. Clean up when done
subscription.remove();
InitIDMissionSDK.initializeSDK

Initializes the SDK. Must be called before any other function. The earlier form initializeSDK(apiBaseUrl, authUrl, debug, accessToken) also still works, with debug set to 'y' or 'n'.

JavaScript
IDMissionSDK.initializeSDK(
  apiBaseUrl,   // string — API base URL, provided by IDmission
  accessToken,  // string — your IDmission access token
  {             // options — optional, these are the defaults
    language: 'en',                // 'en' or 'es' (Android also 'my' and 'ar')
    enableGPS: true,               // capture GPS location with submissions
    geolocationRequired: false,    // block the flow if location access is denied
    isUpdateModelsData: true,      // download the latest SDK models after credential verification
    enableScreenRecording: false,  // allow screen recording / screenshots
    enableDebugMode: false         // verbose SDK logging (use false in production)
  }
);
InfoIDMissionSDK.getSDKInfo

Returns a Promise with the native SDK version and the ML model names in use. models is empty until the SDK has been initialized.

JavaScript
const { version, models } = await IDMissionSDK.getSDKInfo();
// models: [{ name: 'Face Detector', value: 'face_detection_full_range_sparse.tflite' }, ...]
ServiceIDMissionSDK.serviceID20

Initiates the ID Validation (Service ID 20) flow. Captures and validates a government-issued ID document.

JavaScript
IDMissionSDK.serviceID20();
IDMissionSDK.submitResult();
ServiceIDMissionSDK.serviceID10

Initiates the ID Validation and Match Face (Service ID 10) flow. Captures an ID document and matches a live selfie to the photo on the ID.

JavaScript
IDMissionSDK.serviceID10();
IDMissionSDK.submitResult();
ServiceIDMissionSDK.serviceID185

Initiates the Identify Customer (Service ID 185) flow.

JavaScript
IDMissionSDK.serviceID185();
IDMissionSDK.submitResult();
ServiceIDMissionSDK.serviceID660

Initiates the Live Face Check (Service ID 660) flow. Performs liveness detection without document capture.

JavaScript
IDMissionSDK.serviceID660();
IDMissionSDK.submitResult();
ServiceIDMissionSDK.serviceID50

Initiates the ID Validation and Customer Enroll (Service ID 50) flow. Pass your unique customer number.

JavaScript
IDMissionSDK.serviceID50(uniqueCustomerNumber); // string
IDMissionSDK.submitResult();
ServiceIDMissionSDK.serviceID175

Initiates the Customer Enroll Biometrics (Service ID 175) flow.

JavaScript
IDMissionSDK.serviceID175(uniqueCustomerNumber); // string
IDMissionSDK.submitResult();
ServiceIDMissionSDK.serviceID105

Initiates the Customer Verification (Service ID 105) flow.

JavaScript
IDMissionSDK.serviceID105(uniqueCustomerNumber); // string
IDMissionSDK.submitResult();
SubmitIDMissionSDK.submitResult

Submits the captured data and finalizes the current service flow. Call after every service.

JavaScript
IDMissionSDK.submitResult();

Upgrading from the zip install

If your app was set up from ReactNativeSDK2AndroidResources.zip, switch to the GitHub package. It replaces the files you copied from the zip.

  1. 1

    Install the package as shown in Step 1.

  2. 2

    Delete IDMissionSDK.java and IDMissionPackage.java from your app, and remove the add(IDMissionPackage()) line from MainApplication. The module is now registered automatically.

  3. 3

    Remove the idmission-mediumsdk dependency line from android/app/build.gradle; the module adds it. Keep the IDmission Maven repository (Step 2). It has not changed.

  4. 4

    Import the module from the package instead of NativeModules: import { IDMissionSDK, addDataCallbackListener } from 'react-native-idmission-sdk';. Your existing initializeSDK call and the rest of your code keep working.

    Then rebuild with npm run android and test one service on a device.