Android Flutter Wrapper
-
Setup the Flutter development environment based on the development and target OS by following the steps here,
Setting up the development environment
-
Verify that all the Flutter dependencies are installed correctly,
flutter doctor
-
Download and unzip the resources archive, it consists of the android_java_code, android_build_gradle, flutter_dart_code directories.
FlutterSDK2AndroidResources -
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 Android device and run the application,
flutter run
- Add android java code. Copy and paste the contents of the android_java_code folder to the android\src\main\java\com\idmission\newsdkflutter\flutter_plugin_identity_sdk folder. Overwrite files if required.
- Add android build gradle. Copy and paste the contents of the android_build_gradle folder to the android folder. Overwrite file if required.
- Add flutter dart code. From the flutter_dart_code folder, copy and paste flutter_plugin_identity_sdk.dart to the lib folder, copy and paste main.dart to the example/lib folder. Overwrite file if required.
- Modify android plugin project. Open the android folder. In AndroidManifest.xml add the following code in manifest node,
<application>
<activity android:name="com.idmission.newsdkflutter.flutter_plugin_identity_sdk.CallPluginActivity"/>
</application>
- Modify android app project. Open the example/android folder.
- Open the app folder. In the build.gradle file,
- Change minSdkVersion and targetSdkVersion in defaultConfig,
minSdkVersion 24
targetSdkVersion 31
- Add the following code in manifest node,
xmlns:tools="http://schemas.android.com/tools"
android:theme="@style/Theme.MaterialComponents.Light.NoActionBar"
android:theme="@style/Theme.MaterialComponents.DayNight.NoActionBar"
- Open android app project in Android Studio. Open example/android in Android Studio.
- Build and run the code on an Android device.
flutter build apk --target-platform android-arm64
--split-per-abi --release
- Flutter sample app Download link
- Here is a brief description of the sample app functionality,
- Initialize - Initializes the SDK.
- ID Validation - Initiates ID Validation(Service ID 20) flow.
- ID Validation and Match Face - Initiates ID Validation and Match Face(Service ID 10) flow.
- Identify Customer - Initiates Identify Customer(Service ID 185) flow.
- Live Face Check - Initiates Live Face Check(Service ID 660) flow.
- ID Validation and Customer Enroll - Initiates ID Validation and Customer Enroll(Service ID 50) flow.
- Customer Enroll Biometrics - Initiates Customer Enroll Biometrics(Service ID 175) flow.
- Customer Verification - Initiates Customer Verification(Service ID 105) flow.
- Submit Result - Submits the form.