LogoLogo
  • Welcome!
  • GETTING STARTED
    • Signing Up
    • Choose a Product
    • Choose an Integration Option
    • Run Your First Test Job
    • Complete Your KYC
    • Fund Your Wallet
    • Go Live!
    • Pricing
  • SUPPORTED ID TYPES & DOCUMENTS
    • For Individuals (KYC)
      • Using ID Number
        • Supported Countries
          • Côte d'Ivoire
            • National ID (without Photo)
            • Resident ID (without Photo)
          • Ghana
            • Ghana Card
            • Passport
            • Voter's ID
          • Kenya
            • Alien Card
            • KRA Pin
            • National ID
            • National ID (without Photo)
            • Passport
            • Tax Information
          • Nigeria
            • Bank Account
            • BVN
            • NIN V2
            • NIN Slip Verification
            • V_NIN (Virtual NIN)
            • Phone Number
            • Voter's ID
          • South Africa
            • National ID
            • National ID (without Photo)
            • Phone Number
          • Uganda
            • National ID (without Photo)
            • Basic KYC in Uganda
          • Zambia
            • Bank Account
            • TPIN
          • Zimbabwe
            • National ID (without Photo)
        • Test Data
          • Customising Sandbox Test Data
        • ID Number Regex
        • Visual Samples of Supported ID Types
      • Using Document Image
        • Continents
          • Africa
          • Asia and the Middle East
          • Europe
          • North America
          • Oceania
          • South America
    • For Businesses (KYB)
      • Supported Countries
        • Nigeria
          • Business Registration
          • Tax Information
        • Kenya
          • Business Registration
        • South Africa
          • Business Registration
      • ID Number Regex
  • PRODUCTS
    • For Individuals (KYC)
      • AML Check
        • AML News Media
      • Basic KYC
      • Biometric KYC
      • Digital Address Verification
      • Document Verification
        • Document Verification
        • Enhanced Document Verification
      • Electronic Signature
      • Enhanced KYC
      • Phone Number Verification
      • SmartSelfie™ Authentication
      • SmartSelfie™ Compare
      • Smile Secure
    • For Businesses (KYB)
      • Business Verification
  • Integration Options
    • Mobile
      • Getting Started
      • Products
        • Biometric KYC
        • BVN Consent
        • Document Verification
        • Enhanced Document Verification
        • Enhanced KYC
        • SmartSelfie™ Enrollment and Authentication
        • Enhanced SmartSelfie™ Enrollment And Authentication
      • Customization
        • UI Components
      • Offline Mode
      • Release Notes
        • Android Release Notes
        • iOS Release Notes
        • Flutter Release Notes
        • React Native Release Notes
    • No-Code
      • Smile Links
        • Link FAQs
        • Rest API
    • Server to Server
      • Ruby
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
          • KYB - Business Verification
          • AML Check
        • Generate Token for Web Integration
        • Utilities
      • Python
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
          • Business Verification
        • Generate Token for Web Integration
        • Utilities
      • Java
        • Release Notes
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
        • Generate Token for Web Integration
        • Utilities
      • Node.js
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • Enhanced Document Verification
          • SmartSelfie™ Authentication
          • Business Verification
        • Generate Token for Web Integration
        • Utilities
      • PHP
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
        • Generate Token for Web Integration
        • Utilities
    • Rest API
      • Signing your API Request
        • Using Signature
      • Products
      • Postman Collection
      • Utilities
    • Web / Mobile Web
      • Web Integration
        • Installation
        • Usage
        • End User Consent
        • Support
      • Javascript SDK
        • Installation
        • Usage
        • Migration
        • Deprecated Version
          • Installation
          • Usage
          • Notes
          • Support
  • FURTHER READING
    • FAQs
      • What are your support hours?
      • How do I set up a callback?
      • How to re-enroll, deactivate or delete a user?
      • Add or remove team members
      • What are top-level keys?
      • What are partner_params?
      • How do job types map to the new product names?
      • Is there an API I can use to monitor my wallet balance?
      • Is there an API I can query to check the availability status of an ID type?
      • How do I integrate Smile ID in other countries or query other ID types?
      • What are the image types I can upload to Smile ID?
      • Why aren't Kenyan IDs returning images for some IDs queried?
      • Why are some of my bank verification requests returning 'ID authority unavailable'?
      • How can I look up a specific user's data?
      • Selfie best-practices
      • Document capture best-practices
      • What happens under the hood?
      • Guide to the user consent screen
      • What is code 2302?
      • Using the Demo App and Scanning QR codes
    • Job status
    • KYC receipts
    • Result codes
      • Error codes
    • Securing your account with two-factor authentication (2FA)
    • Security Overview
    • Troubleshooting
      • Troubleshooting error 2204 & 2205 - "You're not authorized to do that"
      • Why is my Web API job taking so long?
      • Image capture issues on web client
Powered by GitBook
On this page
  • Supported Versions
  • [Video] How to integrate Smile ID Flutter v7 SDK for Android
  • Gradle Integration
  • Android Manifest
  • Proguard Rules
  • Smile Config
  • Troubleshooting
  • Execution failed for task ':app:mergeDebugJavaResource'.
  • Manifest merger failed : Attribute application@label value=xxx
  • D8: Cannot fit requested classes in a single dex file

Was this helpful?

  1. Integration Options
  2. Mobile
  3. Flutter (deprecated)

Android Setup

Last updated 11 months ago

Was this helpful?

This SDK is deprecated and will receive limited support. Please adopt the v10 SDK:

Supported Versions

Minimum supported version is android 4.04 api 15

Maximum supported version is android 13 api 33

[Video] How to integrate Smile ID Flutter v7 SDK for Android

Gradle Integration

This is best done in Android Studio but if not installed can be done by looking at the android folder of your flutter native project

1. In your root-level (project-level) Gradle file (build.gradle), add rules to include the Maven Central repository.

buildscript {​
        repositories {
        mavenCentral() // add the maven central repository
         maven {
            url 'https://oss.sonatype.org/content/repositories/snapshots/'
          }
   }
}

2. Declare the Smile ID android SDK in your root level Gradle file (usually build.gradle).

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

3. In your module (app-level) Gradle file (usually app/build.gradle), apply the Smile ID android plugin:

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

4. In your module (app-level) Gradle file (usually app/build.gradle), add the Smile ID UI and SDK dependancies

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

Android Manifest

Permissions

Add the following permissions if they do not exist already

  <uses-permission android:name="android.permission.CAMERA" />
  <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.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

Activities

Add the following activities under the application tag

 <!--id capture-->
<activity android:name="com.smileid.smileidui.SIDIDCaptureActivity" />
<!--selfie capture-->
<activity android:name="com.smileid.smileidui.SIDSelfieCaptureActivity" />
<!--selfie review screen-->
<activity android:name="com.smileid.smileidui.SIDReviewActivity" />

Proguard Rules

If using Proguard, then please add the following proguard rule to your rules file (usually called proguard-rules.pro)

-keep class com.smileidentity.** { *; }

Smile Config

That's it android is ready!

Troubleshooting

There are issues that could come up during setup , you can follow the recommended solutions for work arounds\

Execution failed for task ':app:mergeDebugJavaResource'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade More than one file was found with OS independent path 'META-INF/DEPENDENCIES'.

Solution: add this to your module level build.gradle\

android {
....
    packagingOptions {
        exclude 'META-INF/androidx.*'
        exclude 'androidx.*'
        exclude 'META-INF/DEPENDENCIES'
    }
....
}

Manifest merger failed : Attribute application@label value=xxx

Solution: add the snippet below to your AndroidManifest.xml\

<application
...
tools:replace="android:label"
.../>

D8: Cannot fit requested classes in a single dex file

com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
android {
    ....

    defaultConfig {
        ...
        multiDexEnabled true //STEP 1
        ....
    }
}


dependencies {
    ...
    implementation 'com.android.support:multidex:1.0.3'// STEP 2
    ...
}

The latest version for smile id sdks can be found

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

Place the file you downloaded from the portal as specified in the android/app folder

Solution: enable android dex as documented by doing the below

here
here
here
here