Getting Started
Get started

Smile Config File

Add the Smile ID config file to your app:
    1.
    If you have not generated your smile id API key please click here to generate an API key (Skip if you have generated an API key before)
    2.
    Click Download Configuration File to obtain your Smile ID config file (smile_config.json).
    3.
    Move your config file into the module (app-level) directory of your app.
What do you need to know about this config file?
    The Smile ID config file contains unique, and secret identifiers for your project. Do not share this file with extenal parties
    You can download your Smile ID config file again at any time.
    Make sure the config file name is not appended with additional characters, like (2).
    Do not edit the contents of the config file

Gradle Integration

1. In your root-level (project-level) Gradle file (build.gradle), add rules to include the Maven Central repository.
1
buildscript {​ repositories { mavenCentral() // add the maven central repository ...... } dependencies { classpath group: 'com.smileidentity', name: 'smile-id-android', version: '1.0.1'//Smile ID android plugin ...... }​}​allprojects { repositories { mavenCentral() // add the maven central repository ..... }}
Copied!
2. In your module (app-level) Gradle file (usually app/build.gradle), apply the Smile ID android plugin:
1
apply plugin: 'com.smileidentity.smile-id-android'
Copied!
3. Declare the Smile ID android SDK in your module (app-level) Gradle file (usually app/build.gradle).
1
dependencies { // ... implementation 'com.smileidentity:smile-id-sdk:7.2.0'}
Copied!
4. Add the following permissions to the app's AndroidManifest.xml file if they don't already exist
1
<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" />
Copied!
For android 10 and greater add legacy storage support to your application tag in the manifest. Future updates to the SDK will migrate to scoped storage
1
<application...android:requestLegacyExternalStorage="true"...>
Copied!
IMPORTANT
Make sure you request the appropriate permissions the below permissions are REQUIRED. Make sure to add them to the manifest as well as request runtime permissions for dangerous permissions on respective android API levels for a more detailed guide read here
    1
    // For Selfie and ID Captureandroid.permission.CAMERA
    Copied!
    1
    // For storage access to save captured photosandroid.permission.WRITE_EXTERNAL_STORAGEandroid.permission.READ_EXTERNAL_STORAGE
    Copied!
    1
    //to read device metadata related informationandroid.permission.READ_PHONE_STATEandroid.permission.READ_PHONE_NUMBERS
    Copied!
    1
    //network access and checking if there is connectivityandroid.permission.INTERNETandroid.permission.ACCESS_NETWORK_STATE
    Copied!
    Optionally when collecting location information
    1
    //collecting location informationandroid.permission.ACCESS_FINE_LOCATION
    Copied!

Alternative Install

Alternatively 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 your 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
    1
    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" }
    Copied!
    5.
    Make sure to include the (":smile_detect_library-release") module as a dependancy
    1
    dependencies { implementation project(":smile_detect_library-release") }
    Copied!
    6.
    Sync Gradle
The library is now ready to use.
Last modified 4mo ago