digio kyc workflow plugin
Digio kyc workflow flutter plugin
Getting Started
Example flutter kyc workflow application
Android
- Download Android Kyc_workflow SDK and DIGIO Gateway (supports androidx)
-
Add Workflow SDK and Gateway .aar file to android/apps/libs folder
-
Check your app’s build.gradle file (android/apps/build.gradle) to confirm a declaration similar to the following (depending on the build configuration you’ve selected):
android {
compileSdkVersion 32
defaultConfig {
minSdkVersion 21
}
buildFeatures {
viewBinding true
dataBinding true
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.aar"])
implementation 'androidx.core:core:1.9.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.camera:camera-core:1.2.0"
implementation "androidx.camera:camera-camera2:1.2.0"
implementation "androidx.camera:camera-lifecycle:1.2.0"
implementation "androidx.camera:camera-view:1.2.0"
implementation 'androidx.navigation:navigation-fragment:2.5.3'
implementation 'androidx.navigation:navigation-ui:2.5.3'
implementation 'androidx.preference:preference:1.2.0'
implementation 'com.google.mlkit:object-detection:17.0.0'
implementation 'com.google.android.gms:play-services-mlkit-face-detection:17.1.0'
implementation 'com.google.firebase:firebase-common-ktx:20.2.0'
implementation 'com.google.firebase:firebase-crashlytics-ktx:18.3.2'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.google.android.gms:play-services-location:21.0.1'
}
}
- Please note that {current version} will be reflected in the .aar file which is downloaded. For eg. digio-esign-4.0.0 digio-gateway-4.0.1
- Digio SDK supports android version 5.0 and above (SDK level 21 above)
- Module Build Gradle (android/build.gradle) has following
buildscript {
ext.kotlin_version = '1.8.0'
dependencies {
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
}
}
Note: Kotlin plugin should be added at your project level inside build gradle
Refer android guide for android folder Android Guide
IOS
In case of iOS, No need to put SDK. You can proceed with writting the code below.
DigioKycSDK requires permission mentioned below. Make sure to add these permissions in your app's info.plist
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) would like to access your camera.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) would like to access your photo.</string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) would like to access your microphone to capture video.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>$(PRODUCT_NAME) would like to access your location.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>$(PRODUCT_NAME) would like to access your location.</string>
Refer ios guide for ios folder iOS Guide
How to Integrate?
- Download ios Kyc SDK
-
Add Digio ios Kyc SDK to framework folder.
-
Ensure that in the project settings framework is selected as Embed and Sign.
-
Check all the permission required in info.plist
<key>NSCameraUsageDescription</key> <string>$(PRODUCT_NAME) would like to access your camera.</string> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <string>$(PRODUCT_NAME) would like to access your location.</string> <key>NSLocationWhenInUseUsageDescription</key> <string>$(PRODUCT_NAME) would like to access your location.</string> <key>NSMicrophoneUsageDescription</key> <string>$(PRODUCT_NAME) would like to access your microphone to capture video.</string> <key>NSPhotoLibraryUsageDescription</key> <string>$(PRODUCT_NAME) would like to access your photo.</string>
- Please note that {current version} will be reflected in the .zip file which is downloaded. For eg. DigioKycSDK_v_0.2.1
- Digio SDK support for xcode 14.0 and above, Swift version 5.7
Note: Kotlin plugin should be added at your project level inside build gradle
Also refer ios guide for ios folder setup : ios Guide
Starting the digio kyc workflow
var digioConfig = DigioConfig();
digioConfig.theme.primaryColor = "#32a83a";
digioConfig.logo = "https://your_logo_url";
digioConfig.environment = Environment.SANDBOX;
final _kycWorkflowPlugin = KycWorkflow(digioConfig);
_kycWorkflowPlugin.setGatewayEventListener((GatewayEvent? gatewayEvent) {
print("gateway event : " + gatewayEvent.toString());
});
workflowResult = await _kycWorkflowPlugin.start("KID23010416361850266BAKNKNORLP6W","abc@gmail.com","GWT230104163618520T2Y9IPUT2PBNC8",null);
print('workflowResult : ' + workflowResult.toString());