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 :
// 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:
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):
# 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:
<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:
/* unico */
implementation 'com.github.acesso-io:acessobio-android:$version'
To consult click here.
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.
- 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.
Credentials (Client API Key) - Deprecated Method
To import the credentials (Client API Key) into your project, use the following guide:
- Access your instance with login and password;
- 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;
- To create an API Key click on + New API Key or to edit click under the desired API Key;
- 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;
- In the Use secure authentication in SDK field, select the Yes option;
- Expand the Android SDK section, add the project ID and Package Name;
- Finally, click on Save;
- Go back to the APIKey section;
- Choose the API Key configured, in the Bundle column, click on the Download button;
- A new section will open, select the Android option;
- Click on Generate and automatically a new tab will open in your browser containing project information in JSON format;
- Save this JSON.
Learn more about Smartlive with Interaction here.
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.
- Java
- Kotlin
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;
}
}
package <package_name>
import com.acesso.acessobio_android.onboarding.AcessoBioConfigDataSource
class UnicoConfig : AcessoBioConfigDataSource {
override fun getBundleIdentifier(): String {
return BUNDLE_IDENTIFIER
}
override fun getHostKey(): String {
return SDK_KEY
}
}
Credentials (Client API Key) - Deprecated Method
- Java
- Kotlin
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;
}
}
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
}
}
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.