Installation Guide

In this section, you will find all the information needed to install the Unico IDCloud platform SDK in your Android applications


Development Environment Preconditions


Ensure your development environment meets the following preconditions:

  • Android Studio version 9 or higher installed (the official development IDE from Google);

  • Android SDK version 21 or higher;

  • Unico's Maven repository configured.

The capture component provided through the Android SDK supports versions equal to or higher for the following technologies:

  • Android: 5.0 (API 21);

  • Kotlin: 1.6.

Compatible Devices


This SDK does not function on emulators, it is only supported on physical devices.

The Android SDK is compatible with the vast majority of devices running Android 5.0 (API level 21) or higher.

The table below lists the devices tested in our lab, along with the availability of vendor/manufacturer extensions. Some listed extensions may be subject to specific manufacturer APIs or SKUs. Click below to view the tested devices:

Installing the Android SDK


To implement the Unico IDCloud platform’s Android SDK in your Android app, follow the steps below:

1

Configuring the Maven Repository

The Android SDK is available via a Maven repository. Add it to the repositories block in the root-level build.gradle file:

/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
allprojects 
{
    repositories {
        google()
        jcenter()
        maven { 
            url "https://maven-sdk.unico.run/sdk-mobile" 
        }
    }
}

Enable AndroidX support in your gradle.properties file in the root of your project. This ensures better performance and proper functioning of the capture framework.

gradle.properties
# Project-wide Gradle settings.
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

2

Camera and Internet Permissions

To use the camera and internet in your project, add the following permissions to your AndroidManifest.xml:

AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />

3

Adding the Dependency

After configuring the Android SDK, import it into your project by adding acessobio-android to the dependencies block in app/build.gradle.

  • Use the module-specific build.gradle file, not the project-level one:

app/build.gradle
/* unico */
implementation 'io.unico:capture:$version'

If you encounter the error:

  • Invoke-customs are only supported starting with android 0 --min-api 26

Add the following lines to the compileOptions block in app/build.gradle:

android { 
    compileOptions { 
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8 
      } 
}

4

Obtaining Credentials

  • Contact the CSs and/or Onboarding team.

  • Request the SDK Key by entering the identifiers of your applications. Bundle Identifier for iOS, PackageID for Android and Host for WEB.

  • The identifiers of your applications will be linked to the SDK Key by the Unico team.

  • You receive your SDK Key to implement the AccessBioConfigDataSource.

5

Embedding Credentials in Your Project

  • Implement the AcessoBioConfigDataSource protocol in your class:

package <package_name>

import com.acesso.acessobio_android.onboarding.AcessoBioConfigDataSource;

public class UnicoConfig implements AcessoBioConfigDataSource {
    @Override
    public String getBundleIdentifier() {
        return BUNDLE_IDENTIFIER;
    }
        
    @Override
    public String getHostKey() {
        return SDK_KEY;
    }
}
Depracated Method - Java
package <package_name>

import com.acesso.acessobio_android.onboarding.AcessoBioConfigDataSource;

public class UnicoConfig implements AcessoBioConfigDataSource {
    @Override
    public String getProjectNumber() {
        return PROJECT_NUMBER;
    }
    
    @Override
    public String getProjectId() {
        return PROJECT_ID;
    }
    
    @Override
    public String getMobileSdkAppId() {
        return MOBILE_SDK_APP_ID;
    }
    
    @Override
    public String getBundleIdentifier() {
        return BUNDLE_IDENTIFIER;
    }
    
    @Override
    public String getHostInfo() {
        return HOST_INFO;
    }
    
    @Override
    public String getHostKey() {
        return HOST_KEY;
    }
}
Deprecated Method - Kotlin
package <package_name>

import com.acesso.acessobio_android.onboarding.AcessoBioConfigDataSource

class UnicoConfig : AcessoBioConfigDataSource {
    override fun getProjectNumber(): String {
        return PROJECT_NUMBER
    }

    override fun getProjectId(): String {
        return PROJECT_ID
    }

    override fun getMobileSdkAppId(): String {
        return MOBILE_SDK_APP_ID
    }

    override fun getBundleIdentifier(): String {
        return BUNDLE_IDENTIFIER
    }

    override fun getHostInfo(): String {
        return HOST_INFO
    }

    override fun getHostKey(): String {
        return HOST_KEY
    }
}

Once the SDK installation is complete, proceed to the implementation by reading the following Usage and Integration Guide:


Still need help?

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.

Atualizado

Institucional

Sobre nós

Copyright © 2024 unico. All rights reserved