Installation

The SDK is available via Gradle and is hosted on Mavern Central

Installation

Step 1. Add Mavern Central Repo to project level build.gradle

buildscript {
    repositories {
        mavenCentral() // add this
    }
}

allprojects {
    repositories {
        mavenCentral() // add this
    }
}

Step 2: Add the Smile ID Class Path in the project level build.gradle


buildscript {
    dependencies {
        classpath group: 'com.smileidentity', name: 'smile-id-android', version: '1.0.1'
    }
}

Step 3: Apply the Smile ID Plugin in the module level build.gradle (usually app)

Please add this at the top of your build.gradle file but under the com.android.application level

apply plugin: 'com.smileidentity.smile-id-android'

Step 4: Add the Smile ID UI as a dependency

The latest version can be found here

implementation 'com.smileidentity:smile-id-sdk:<latest_version>'
implementation 'com.smileidentity:netjava:<latest_version>'// currently (0.0.8)

NB: If you have already integrated with the Android SDK only Remove the reference to the Smile ID dependency as the Smile UI will automatically pull the correct version in. and also remember to check the latest version here

Step 5: Required Permissions

Before calling the Smile UI screens make sure the below permissions are allowed by the user

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

You may optionally choose to report crashes caused by the Smile ID SDK to Smile ID. Only crashes caused by Smile Identity will be reported. Enablling Smile ID Crash Reporting will not interfere with any other crash reporting you may be doing for your own app. This feature is opt-in, and disabled by default.

To enable it, simply call the static method from your Application or main Activity class.

import android.app.Application
import com.smileidentity.libsmileid.utils.CrashReporting.enableSmileIdentityCrashReporting

class YourApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        enableSmileIdentityCrashReporting();
    }
}

Disabling crash reporting at runtime is as simple as calling the static method disableSmileIdentityCrashReporting()

Last updated