Installation
1. Add the Maven repository
Section titled “1. Add the Maven repository”The SDK is distributed from Techsign’s Maven repository. Get the repository credentials from your Techsign representative and keep them in ~/.gradle/gradle.properties (or your CI secrets), not in the project.
mavenUser=USERNAMEmavenPassword=PASSWORDallprojects { repositories { google() mavenCentral() maven { url 'https://repo.biyometrikimza.com/repository/androidsdk/' credentials { username mavenUser password mavenPassword } } }}2. Add the dependencies
Section titled “2. Add the dependencies”android { defaultConfig { minSdkVersion 24 multiDexEnabled true }
// The SDK's on-device models must be packaged uncompressed. aaptOptions { noCompress "tflite" noCompress "lite" }}
dependencies { implementation group: 'com.techsign', name: 'rkyc-cnn', version: '2.1.8' implementation group: 'com.techsign', name: 'id-card-detection-cnn', version: '1.9.9' implementation group: 'com.techsign', name: 'passport-reader-cnn', version: '1.1.3'}Optional dependencies
Section titled “Optional dependencies”| Feature | Dependency |
|---|---|
On-device OCR (setDoOcr(true)) |
com.google.android.gms:play-services-mlkit-text-recognition:17.0.0 |
MRZ reading (setMrzActive(true)) |
org.jmrtd:jmrtd:0.5.13 |
3. Permissions
Section titled “3. Permissions”<uses-permission android:name="android.permission.CAMERA" /><uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.NFC" />
<uses-feature android:name="android.hardware.camera" android:required="false" /><uses-feature android:name="android.hardware.camera.autofocus" android:required="false" /><uses-feature android:name="android.hardware.nfc" android:required="false" />Request the camera permission at runtime too. If you make NFC required (required="true"), your app is hidden on Google Play for devices without NFC; to keep the NFC step optional, leave it false and check for NFC in code:
boolean hasNfc = NfcAdapter.getDefaultAdapter(context) != null;