Adding the library

We provide our Android SDK via the Partner Portal in the form of an .aar file.

You can add the Smile ID Android Library to you application in a few simple steps:

  1. Download the SmartSelfieā„¢ SDK here. This is provided in the form of a zip file. Extract the SDK from the zip to get started.

  2. Add a module to the current project and import the .aar file from the zip

  3. Add a module dependancy and select the smile_detect_library-release.aar module, by going File>New>New Module then selecting Import .JAR/.AAR Package from the popup window.

  4. Edit the app's build.gradle to add the following dependencies with the compatible versions

    implementation 'com.google.android.gms:play-services-awareness:<VERSION>'
    implementation 'com.google.android.gms:play-services-location:<VERSION>'
    implementation 'com.google.android.gms:play-services-vision:<VERSION>'
    implementation 'com.google.code.gson:gson:<VERSION>'
    implementation 'org.apache.httpcomponents:httpclient-android:<VERSION>'
    implementation('org.apache.httpcomponents:httpmime:<VERSION>') {
    exclude module: "httpclient"
    }
  5. Make sure to include the (":smile_detect_library-release") module as a dependancy

    dependencies {
    implementation project(":smile_detect_library-release")
    }
  6. Sync Gradle

  7. Add the following permissions to the app's AndroidManifest.xml file if they don't already exist

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

The library is now ready to use.