Skip to main content

Preparation

Amani SDK-UI package is an interface package prepared using Amani-SDK-V2. You can use this package directly by cloning and modifying it, or you can install the AAR package via jitpack with the following implementation without changing the interface.

Required Permissions

This SDK makes use of the devices Camera, Location and NFC permissions. If you don't want to use location service, please provide in init method.

You must have the folowing keys in your application's manifest file:

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.NFC" />

Requirements

The minimum requirements for the SDK are:

  • API Level 21
  • compileSDKVersion 33

ProGuard Rule Usage

  • If you are using ProGuard in your application, you just need to add this line into your ProGuard Rules!
    -keep class com.amani_ml** {*;}
-dontwarn com.amani.ml**
-keep class datamanager.** {*;}
-dontwarn datamanager.**
-keep class networkmanager.** {*;}
-dontwarn networkmanager.**
-keep class com.amani_ai.jniLibrary.CroppedResult { *; }

-keep class org.jmrtd.** { *; }
-keep class net.sf.scuba.** {*;}
-keep class org.bouncycastle.** {*;}
-keep class org.spongycastle.** {*;}
-keep class org.ejbca.** {*;}

-dontwarn org.ejbca.**
-dontwarn org.bouncycastle.**
-dontwarn org.spongycastle.**
-dontwarn org.jmrtd.**
-dontwarn net.sf.scuba.**

-keep class org.tensorflow.lite**{ *; }
-dontwarn org.tensorflow.lite.**
-keep class org.tensorflow.lite.support**{ *; }
-dontwarn org.tensorflow.lite.support**

How do I get set up?

  • Dependencies:
  1. Add the following dependencies to your Module build.gradle file.
implementation 'ai.amani:Android.SDK.UI:1.0.0beta07'
  1. Enable DataBinding in the Module build.gradle by adding this line into code block of android :

android {     
dataBinding { enabled true } // Add this line to enable data binding feature.
}
  1. Add the following in the Project build.gradle within in buildscript within the buildscript->repositories and buildscript->allprojects.

allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}

  1. Add the following pom to the dependencies section of your gradle build file :
  aaptOptions {
noCompress "tflite"
}