Android
Integrating ezto verify's SDK into your Flutter project for Android is straightforward. Follow our comprehensive documentation and sample code snippets to quickly implement user verification features.
1 Requirements
The minimum requirements needed in order to use the ezto verify SDK in your Flutter project. Ensure your development environment meets these prerequisites before proceeding with the integration.
- Dart SDK 3.4.0 and above
- Flutter SDK 3.22.0 and above
- Android 14 (API level 34)
2 Installation
To add the ezto verify SDK to your Flutter project, it is necessary to add the below code to your pubspec.yaml
file in the dependency section.
eztoverify:
git:
url: git@gitlab.grootan.com:qlikverify/ezto_verify_flutter_sdk.git
tag: 5.0.0+24570401
3 Permissions
This section lists the permissions that need to be declared in your AndroidManifest.xml
file located in <PROJECT_DIR>\android\app\src\main\AndroidManifest.xml
. These permissions are required for the ezto verify SDK to function correctly, allowing it to access the necessary device features.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
<uses-permission android:name="android.permission.AUDIO_CAPTURE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
4 Setup
This section explains how to set up the ezto verify SDK for different verification methods available. Currently, we have Android setup available for Biometric, FIDO, UAE PASS Verification, and DeepLink.
Biometric
To enable Biometric in your Flutter project. It covers the necessary changes to your activity class and configuration in the build.gradle
file.
If you are using
FlutterActivity
directly, change it toFlutterFragmentActivity
in yourAndroidManifest.xml.
If you are using a custom activity, update your
MainActivity.kt
:
import io.flutter.embedding.android.FlutterFragmentActivity
class MainActivity: FlutterFragmentActivity() {
// ...
}
or MainActivity.java:
import io.flutter.embedding.android.FlutterFragmentActivity;
public class MainActivity extends FlutterFragmentActivity {
// ...
}
- Add the following code to the
repositories
section inbuild.gradle
:
To get the token, contact admin support.
maven {
url "https://gitlab.grootan.com/api/v4/projects/573/packages/maven"
credentials(HttpHeaderCredentials) {
name "Deploy-Token"
value "YourTokenHere"
}
authentication {
header(HttpHeaderAuthentication)
}
}
FIDO / Passkeys
To setup FIDO or Passkeys, it is necessary to include the proguard-rules.pro
to your project to ensure proper functionality.
-if class androidx.credentials.CredentialManager
-keep class androidx.credentials.playservices.** {
*;
}
UAE PASS Verification
To enable UAE PASS Verification, it is required to add the queries
section to your AndroidManifest.xml
file located in <PROJECT_DIR>\android\app\src\main\AndroidManifest.xml
:
<queries>
<package android:name="ae.uaepass.mainapp"/>
<package android:name="ae.uaepass.mainapp.stg"/>
</queries>
DeepLink
To setup the DeepLink functionality, it is required to intent filters and configurations in the AndroidManifest.xml
file located in <PROJECT_DIR>\android\app\src\main\AndroidManifest.xml
to handle deep links correctly.
<!-- By default, flutter Activity is set with android:launchMode="singleTop". This is perfectly fine and expected, but this launches another instance of your app, specifically for the requested view.
If you don't want this behaviour, you can set android:launchMode="singleInstance" in your AndroidManifest.xml to avoid another flutter warmup. -->
<activity
android:launchMode="singleInstance">
<!-- Make sure you explicitly set android:autoVerify to "true". -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- If a user clicks on a shared link that uses the "http" scheme, your
app should be able to delegate that traffic to "https". -->
<data android:scheme="https" />
<!-- Include one or more domains that should be verified. -->
<!-- Replace example.ezto.io with your ezto verify workspace url -->
<!-- Go to Dashboard > Settings > General, copy the URL. -->
<data android:host="example.ezto.io" />
<data android:path="/auth/deeplink.html" />
</intent-filter>
</activity>