Skip to main content

How to begin

Before you begin

DEVELOPMENT ENVIRONMENT

Your development environment must meet the following before you begin:

  • Have version 9 or higher of Android Studio installed (Google official development IDE);
  • Have the Android SDK version 21 or higher;
  • Have configured the Maven Jitpack package manager.

Installation and configuration

USING JITPACK MANAGER

Jitpack is a new package repository for Android projects. To install the Android SDK in your project using the JitPack Manager, follow the guidelines below:

For projects where repositories are defined in the build.gradle file, add the repository manager Jitpack Manager to the repositories block of the existing build.gradle file in the root of your project :

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://jitpack.io'}
}
}

For new Android Studio projects that specify repository locations in the project's settings.gradle file, add the repository manager Jitpack Manager to the repositories block of the settings.gradle file existing at the root of your project:

settings.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io'}
}
}

Enable AndroidX support in your gradle.properties file at the root of your project (This ensures a better performance and operation of the capture frame):

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

PERMISSIONS TO USE THE CAMERA AND INTERNET

To use the camera opening method in your project, you need to add permission to use the camera and internet in your AndroidManifest.xml file:

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

INCLUSION OF DEPENDENCE

After configuring the Android SDK in your project, simply import it into your project. To do this, add accessobio-android to the dependencies block of the app/build.gradle file.

Note that the dependency must be included in a different file than the one used in the previous step. In this step, it is necessary to use the build.gradle file referring to the module and not to the project:

app/build.gradle
/* unico */
implementation 'com.github.acesso-io:acessobio-android:$version'
AVAILABLE VERSIONS

To consult click here.

ERROR COMPILE

When compiling the project, if the error is displayed:

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

When compiling due to version incompatibility of frame min-26. Add the following lines to the compileOptions block, in the same app/build.gradle file:

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

GETTING CREDENTIALS

To use the Android SDK you need to obtain the SDK Key credential, a unique customer identification key generated by the Unico team.

  1. contact the CSs and/or Onboarding team.
  2. Request the SDK Key by entering the identifiers of your applications. Bundle Identifier for iOS, PackageID for Android and Host for WEB.
  3. The identifiers of your applications will be linked to the SDK Key by the Unico team.
  4. You receive your SDK Key to implement the AccessBioConfigDataSource.
Credentials (Client API Key) - Deprecated Method

To import the credentials (Client API Key) into your project, use the following guide:

  1. Access your instance with login and password;
  2. Scroll down the menu bar and click on the Settings menu, then click on the Integration menu and finally click on the API Key menu;
  3. To create an API Key click on + New API Key or to edit click under the desired API Key;
  4. If you want to use the FaceTec Proof of Life Selfie Camera mode, check that the Use liveness with interaction field is filled in with the YES option. If it is filled in with NO, or is not appearing, please contact the support through Help Center and request activation;
  5. In the Use secure authentication in SDK field, select the Yes option;
  6. Expand the Android SDK section, add the project ID and Package Name;
  7. Finally, click on Save;
  8. Go back to the APIKey section;
  9. Choose the API Key configured, in the Bundle column, click on the Download button;
  10. A new section will open, select the Android option;
  11. Click on Generate and automatically a new tab will open in your browser containing project information in JSON format;
  12. Save this JSON.
SMARTLIVE WITH INTERACTION (LIVENESS WITH INTERACTION)

Learn more about Smartlive with Interaction here.

ATTENTION TO POP-UP BLOCKERS

If in step 10 the tab does not open, please check if your browser is blocking pop-ups.

EMBARKING CREDENTIALS INTO YOUR PROJECT

To add the SDK Key to the project, implement the AccessBioConfigDataSource 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;
}
}
Credentials (Client API Key) - Deprecated Method
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;
}
}

Any concerns?

Didn't find something or still need help? If you are already a customer or partner, you can contact us through Help Center.

Next steps