SybrinFacialRecognitionConfiguration.Builder

import com.sybrin.facialrecognition.SybrinFacialRecognitionConfiguration

Builder for the immutable SybrinFacialRecognitionConfiguration class

Summary

Public constructors

Builder(String license)

Creates a new Builder using a Sybrin Biometrics Android License.

Public methods

build(Context context)

Creates and returns a built SybrinFacialRecognitionConfiguration object.

cloneConfiguration(Builder configuration)

Clones the properties from an already created SybrinFacialRecognitionConfiguration object.

enableTorchButton(boolean enableTorchButton)

Sets the visibility of the torch button.

saveImages(boolean saveImages)

Sets whether the SDK should save all captured images to the device upon completion of the facial recognition process.

setCameraFacing(CameraFacing cameraFacing)

Sets the direction of the camera that is used for the scanning process.

setCapturedImageCountForTraining(int imageCount)

Specifies the number of images to be taken during training for facial recognition.

setCustomAuthorizationToken(String customAuthorizationToken)

Specifies a custom authorization token to be used during the online calls within the SDK.

setEnvironmentKey(String environmentKey)

Sets key that defines the SDK's internal environment variables.

setLanguage(Language language)

Sets language to be used within the SDK.

setOverlayBorderColor(int overlayBorderColor)

Sets the color of the overlay cutout border.

setOverlayBorderThickness(int overlayBorderThickness)

Sets the thickness of the overlay cutout border.

setOverlayBrandingSubtitleColor(int overlayBrandingSubtitleColor)

Sets the text color of the branding subtitle.

setOverlayBrandingSubtitleText(String overlayBrandingSubtitleText)

Sets the text of the branding subtitle.

setOverlayBrandingTitleColor(int overlayBrandingTitleColor)

Sets the text color of the branding title.

setOverlayBrandingTitleText(String overlayBrandingTitleText)

Sets the text of the branding title.

setOverlayColor(int overlayColor)

Sets the color of the overlay.

setOverlayLabelTextColor(int overlayLabelTextColor)

Sets the color of the overlay label text.

setOverlaySubLabelTextColor(int overlaySubLabelTextColor)

Sets the color of the overlay sub-label text.

setTorchButtonColor(int torchButtonColor)

Sets the color of the torch button.

Public constructors

Builder

public Builder (String license)

Creates a new Builder using a Sybrin Biometrics Android License.

Public methods

build

public SybrinFacialRecognitionConfiguration build (Context context)

Creates and returns a built SybrinFacialRecognitionConfiguration object.

Parameters

context

Context: The application's internal context.

Returns

This value cannot be null.

cloneConfiguration

public SybrinFacialRecognitionConfiguration.Builder cloneConfiguration(SybrinFacialRecognitionConfiguration configuration)

Clones the properties from an already created SybrinFacialRecognitionConfiguration object.

Parameters

configuration

SybrinFacialRecognitionConfiguration: An instance of a built configuration object.

Returns

This value cannot be null.

enableTorchButton

public SybrinFacialRecognitionConfiguration.Builder enableTorchButton (boolean enableTorchButton)

Default value: true Sets the visibility of the torch button.

Parameters

enableTorchButton

boolean: true if torch button is visible, false if torch button is invisible.

Returns

This value cannot be null.

Visual Example:

Default

Configured - Torch button disabled

saveImages

public SybrinFacialRecognitionConfiguration.BuildersaveImages (boolean saveImages)

Default value: false Sets whether the SDK should save all captured images to the device upon completion of the facial recognition process.

Parameters

saveImages

boolean: true if captured images should be saved, false if captured images should not be saved.

Returns

This value cannot be null.

setCameraFacing

public SybrinFacialRecognitionConfiguration.BuildersetCameraFacing (CameraFacing cameraFacing)

Default value: CameraFacing.Back Sets the direction of the camera that is used for the scanning process.

Parameters

cameraFacing

CameraFacing: CameraFacing.Back if the camera to be used during the scanning process is at the back of the device.

CameraFacing.Front if the camera to be used during the scanning process is at the front of the device.

Returns

This value cannot be null.

setCapturedImageCountForTraining

public SybrinFacialRecognitionConfiguration.BuildersetCapturedImageCountForTraining (int imageCount)

Specifies the number of images to be captured for training of facial recognition.

Parameters

imageCount

int: The number of images to be captured

Returns

This value cannot be null.

setCustomAuthorizationToken

public SybrinFacialRecognitionConfiguration.BuildersetCustomAuthorizationToken (String customAuthorizationToken)

Specifies a custom authorization token to be used during the online calls within the SDK.

Parameters

customAuthorizationToken

String: The custom authorization token

Returns

This value cannot be null.

setEnvironmentKey

public SybrinFacialRecognitionConfiguration.Builder setEnvironmentKey(String environmentKey)

Sets key that defines the SDK's internal environment variables.

Parameters

setEnvironmentKey

String: Key that defines SDK environment variables. Value cannot be null.

Returns

This value cannot be null.

setLanguage

public SybrinFacialRecognitionConfiguration.BuildersetLanguage(Language language)

Sets the language to be used within the SDK.

Parameters

language

Language: The language that is to be used within the SDK

Returns

This value cannot be null.

setOverlayBorderColor

public SybrinFacialRecognitionConfiguration.BuildersetOverlayBorderColor (int overlayBorderColor)

Default value: Color.WHITE Sets the color of the overlay cutout border.

Parameters

setOverlayBorderColor

int

Returns

This value cannot be null.

Visual Example:

Default

Configured - Border color green

setOverlayBorderThickness

public SybrinFacialRecognitionConfiguration.BuildersetOverlayBorderThickness (int overlayBorderThickness)

Default value: 7 Sets the thickness of the overlay cutout border.

Parameters

setOverlayBorderThickness

int

Returns

This value cannot be null.

Visual Example:

Default

Configured - Border thickness 20

Configured - Border thickness 0

setOverlayBrandingSubtitleColor

public SybrinFacialRecognitionConfiguration.BuildersetOverlayBrandingSubtitleColor (int overlayBrandingSubtitleColor)

Default value: Color.WHITE Sets the text color of the branding subtitle.

Parameters

setOverlayBrandingSubtitleColor

int

Returns

This value cannot be null.

Visual Example:

Default

Configured - Branding subtitle color green

setOverlayBrandingSubtitleText

public SybrinFacialRecognitionConfiguration.BuildersetOverlayBrandingSubtitleText (String overlayBrandingSubtitleText)

Default value: "A DIVISION OF SYBRIN" Sets the text of the branding subtitle.

Parameters

setOverlayBrandingSubtitleText

String: Text that is shown as the branding subtitle. Value cannot be null.

Returns

This value cannot be null.

Visual Example:

Default

Configured - Branding subtitle text

setOverlayBrandingTitleColor

public SybrinFacialRecognitionConfiguration.BuildersetOverlayBrandingTitleColor (int overlayBrandingTitleColor)

Default value: Color.WHITE Sets the text color of the branding title.

Parameters

setOverlayBrandingTitleColor

int

Returns

This value cannot be null.

Visual Example:

Default

Configured - Branding title color green

setOverlayBrandingTitleText

public SybrinFacialRecognitionConfiguration.BuildersetOverlayBrandingTitleText (String overlayBrandingTitleText)

Default value: "INNOVATIONS LAB" Sets the text of the branding title.

Parameters

setOverlayBrandingTitleText

String: Text that is shown as the branding title. Value cannot be null.

Returns

This value cannot be null.

Visual Example:

Default

Configured - Branding title text

setOverlayColor

public SybrinFacialRecognitionConfiguration.BuildersetOverlayColor (int overlayColor)

Default value: Color.argb(80, Color.red(Color.BLACK), Color.green(Color.BLACK), Color.blue(Color.BLACK)) Sets the color of the overlay.

Parameters

setOverlayColor

int

Returns

This value cannot be null.

Visual Example:

Default

Configured - Overlay color green

Configured - Overlay color green with opacity

setOverlayLabelTextColor

public SybrinFacialRecognitionConfiguration.BuildersetOverlayLabelTextColor (int overlayLabelTextColor)

Default value: Color.WHITE Sets the color of the overlay label text.

Parameters

setOverlayLabelTextColor

int

Returns

This value cannot be null.

Visual Example:

Default

Configured - Label text color green

setOverlaySubLabelTextColor

public SybrinFacialRecognitionConfiguration.BuildersetOverlaySubLabelTextColor (int overlaySubLabelTextColor)

Default value: Color.WHITE Sets the color of the overlay sub-label text.

Parameters

setOverlaySubLabelTextColor

int

Returns

This value cannot be null.

Visual Example:

Default

Configured - Sub-label color green

setTorchButtonColor

public SybrinFacialRecognitionConfiguration.BuildersetTorchButtonColor (int torchButtonColor)

Default value: Color.WHITE Sets the color of the torch button.

Parameters

setTorchButtonColor

int

Returns

This value cannot be null.

Visual Example:

Default

Configured - Torch button color green

Last updated