Skip to main content

References

About this guide

This guide is a collection of methods and objects available in the Android SDK of Unico Check.

Constant improvement

Currently only a few objects and code snippets are available for your integration. The goal is to have an auto-generated API Reference.

Capture Frame Customizations

You can customize the capture frame in the SDK allowing the customers to apply their own visual identities. Following an extensive list with all the available methods:

Available methods

Method getColorSilhouetteSuccess()

Method used to customize the silhouette color in a successful capture.

Method getColorSilhouetteError()

Method used to customize the silhouette color in case of an error in the capture process.

Method getColorBackground()

Method used to customize the silhouette's background color.

Method getColorBoxMessage()

Method used to customize box background color.

Method getColorTextMessage()

Method used to customize message's text color.

Method getColorTextPopupError()

Method used to customize popup's icons and text.

Method getColorBackgroundPopupError()

Method used to customize popup's backgroud color.

Method getColorBackgroundButtonPopupError()

Method used to customize popup's button background color.

Method getColorTextButtonPopupError()

Method used to customize popup's button text color.

Method getColorBackgroundTakePictureButton()

Method used to customize "Take Picture" background color.

Method getColorIconTakePictureButton()

Method used to customize "Take Picture" button icon.

Method getColorBackgroundBottomDocument()

Method used to customize "Capture Document" box background color.

Method getColorTextBottomDocument()

Method used to customize "Capture Document" box text color.

Method getImageIconPopupError()

Method used to customize the error popup icon that is displayed whenever user´s face is incorrectly positioned in the capture area.

Method getProgressBarColor() (optional)

Optional method used to customize the color of the smartlive with interaction camera loading icon. If not implemented, getColorBoxMessage() is used.

Method getCancelButtonIconColor() (optional)

Optional method used to customize the color of the smartlive with interaction camera cancel icon. If not implemented, getColorBackgroundTakePictureButton() is used.

Exemplos de utilização

Below, you can find some customization examples using the methods above.


.h:
#import "AcessoBioThemeDelegate.h"

@interface ViewController : UIViewController {

@end

.m:
#import "ViewController.h"
#import <AcessoBio/AcessoBio.h>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];

unicoCheck = [[AcessoBioManager alloc]initWithViewController:self];
}

- (id)getColorBackground {
code
}

- (id)getColorBackgroundBottomDocument {
code
}

- (id)getColorBackgroundButtonPopupError {
code
}

- (id)getColorBackgroundPopupError {
code
}

- (id)getColorBackgroundTakePictureButton {
code
}

- (id)getColorBoxMessage {
code
}

- (id)getColorIconTakePictureButton {
code
}

- (id)getColorSilhouetteError {
code
}

- (id)getColorSilhouetteSuccess {
code
}

- (id)getColorTextBottomDocument {
code
}

- (id)getColorTextButtonPopupError {
code
}

- (id)getColorTextMessage {
code
}

- (id)getColorTextPopupError {
code
}

- (id) getProgressBarColor {
code
}

- (id) getCancelButtonIconColor {
code
}

@end

Session timeouts

By default, the timeout for face detection is set to 13 seconds. If the users are not able to capture their faces and the timeout for face detection is reached, the capture mode is automatically changed to the manual mode. This timeout configuration can not be changed.

Configuring general session timeout

Method setTimeoutSession:

With this method you can configure the general session timeout. The session timeout must be configured in seconds.

This configuration is useful if you want to display a nice message to your users once the timeout is reached.

  • The standard timeout value is 60 seconds;
  • The minimum timeout value is 40 seconds;

Implementation example:

#import "ViewController.h"
#import <AcessoBio/AcessoBio.h>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];

unicoCheck = [[AcessoBioManager alloc] initWithViewController:self];
[unicoCheck setTimeoutSession:50];

}

ErrorBio Object

This object is returned whenever an error happens inside the SDK.

Available methods

Method getCode():

  • Method used to get the error code.

Method getDescription()

  • Method used to get the error message.

Error codes

The following list describes the possible error codes returned by the SDK.

CódigoDescrição
73000The Session was cancelled because of an unknown and unexpected error. The Unico Check SDK leverages a variety of iOS APIs including camera, storage, security, networking, and more. This return value is a catch-all for errors experienced during normal usage of these APIs.
73001Context invalid
73003The API version needs to be 11 or newer.
73006Unable to open camera on emulators
73100Unable to connect to internet
73200Could not find the unico_sdk json file
73202Unable to load unico_sdk json file
73203Unable to load AcessoBioConfigDataSource
73204Unable to initialize the SDK, please configure the environment on setEnviroment method of build.
73300Unable to get unico authentication object
73301Unable to parse unico authentication object
73302Could not find the unico token
73701Could not find active liveness import
73702Unable to initialize active liveness in production mode
73703Unable to get active liveness session
73704The user pressed the cancel button and did not complete the Session.
73705The Session was not performed successfully and a FaceScan was not generated. In general, other statuses will be sent to the developer for specific unsuccess reasons.
73706The camera access is prevented because either the user has explicitly denied permission or the user's device is configured to not allow access by a device policy.
73707The Session was cancelled due to the app being terminated, put to sleep, an OS notification, or the app was placed in the background.
73708The Session was cancelled because the device is in landscape mode. The user experience of devices in these orientations is poor and thus portrait is required.
73709The Session was cancelled because the device is in reverse portrait mode. The user experience of devices in these orientations is poor and thus portrait is required.
73710The Session was cancelled because the user was unable to complete a Session in the default allotted time or the timeout set by the developer.
73711The Session was cancelled due to memory pressure.
73712The Session was cancelled because your App is not in production and requires a network connection.
73713The Session was cancelled because your key needs to be validated again.
73714The Session was cancelled because the developer-configured encryption key was not valid.
73715The Session was cancelled because not all guidance images were configured.
73716The Session was cancelled because the SDK was unable to start the camera on this device.
73717The Session was cancelled because the user was in a locked out state.
73718The Session was cancelled because of an unknown and unexpected error. SDK leverages a variety of iOS APIs including camera, storage, security, networking, and more. This return value is a catch-all for errors experienced during normal usage of these APIs.
73719The Session was cancelled because the user pressed the Get Ready screen subtext message. Note: This functionality is not available by default, and must be requested from FaceTec in order to enable it.
73720The Session was not processed.
73721The Session can't be performed: attempts limit exceeded.
73722The Session can't be performed: face alignment timeout.
73730Unable to initialize an active liveness session because of an unknown and unexpected license error.
73731Unable to initialize an active liveness session because the license has expired.
73800Could not encrypt response