Integrate IDmission's IDentity SDK into your Android Flutter application.
Set up the Flutter development environment based on your development and target OS by following the official Flutter guide.
Setting up the development environment →Verify that all Flutter dependencies are installed correctly.
flutter doctor
Download and unzip the resources archive. It contains the android_java_code, android_build_gradle, and flutter_dart_code directories.
Run the following commands in your working directory to create the plugin template.
flutter create --template=plugin --org com.idmission.newsdkflutter --platforms=android,ios -a java -i swift flutter_plugin_identity_sdk
cd flutter_plugin_identity_sdk
cd example
flutter pub upgrade
dart migrate --apply-changes
Connect an Android device and run the application to verify the base template works.
flutter run
Add SDK files from the downloaded archive.
android_java_code to android/src/main/java/com/idmission/newsdkflutter/flutter_plugin_identity_sdk. Overwrite files if required.android_build_gradle to the android folder. Overwrite if required.flutter_dart_code, copy flutter_plugin_identity_sdk.dart to the lib folder, and main.dart to example/lib. Overwrite if required.Modify the Android plugin project. Open the android folder. In AndroidManifest.xml, add the following inside the <manifest> node.
<application>
<activity android:name="com.idmission.newsdkflutter.flutter_plugin_identity_sdk.CallPluginActivity"/>
</application>
Modify the Android app project. Open the example/android folder and apply the following changes.
Update the SDK versions in defaultConfig.
minSdkVersion 26
targetSdkVersion 36
Add the tools namespace to the <manifest> node.
xmlns:tools="http://schemas.android.com/tools"
Add the following theme to the <application> node.
android:theme="@style/Theme.MaterialComponents.Light.NoActionBar"
Add the following theme to the <activity> node.
android:theme="@style/Theme.MaterialComponents.DayNight.NoActionBar"
Open the Android app project in Android Studio by opening example/android.
Build and run the code on an Android device.
flutter build apk --target-platform android-arm64 --split-per-abi --release
The following functions are available after initializing the SDK.
Initializes the SDK. Must be called before any other function.
idm_sdk_init(String apiBaseUrl, String debug, String accessToken)
Initiates the ID Validation (Service ID 20) flow.
idm_sdk_serviceID20()
Initiates the ID Validation and Match Face (Service ID 10) flow.
idm_sdk_serviceID10()
Initiates the Identify Customer (Service ID 185) flow.
idm_sdk_serviceID185()
Initiates the Live Face Check (Service ID 660) flow.
idm_sdk_serviceID660()
Initiates the ID Validation and Customer Enroll (Service ID 50) flow.
idm_sdk_serviceID50(int uniqueCustomerNumber)
Initiates the Customer Enroll Biometrics (Service ID 175) flow.
idm_sdk_serviceID175(int uniqueCustomerNumber)
Initiates the Customer Verification (Service ID 105) flow.
idm_sdk_serviceID105(int uniqueCustomerNumber)
Submits the form and finalizes the current service flow.
submit_result()