Skip to main content

Initialization Parameters

Parameters passed when launching the Facial Lite SDK. The source image is required; all other parameters are optional and have sensible defaults.

Parameters

ParameterAndroidiOSTypeRequiredDefault
Source imagefacialImagesourceString (base64)Yes
Blur thresholdblurThresholdblurThresholdFloat / IntNo100
Auto-capture timeoutautoCaptureTimeoutSecondsautoCaptureDurationInt / Double (seconds)No10

Parameter Descriptions

ParameterDescription
Source imageBase64-encoded image of the reference face used for comparison. Must be a valid, non-empty image string containing a detectable face. Invalid or missing values result in a no_source or no_face error before the camera flow starts.
Blur thresholdSensitivity for detecting blurred or shaky camera frames during capture. Lower values are stricter (fewer frames pass); higher values are more lenient. Valid range: 50–400. Available in SDK version >= 2.0.0.
Auto-capture timeoutMaximum time the SDK waits for an automatic face capture before switching to manual capture. When the timeout is reached, the user must tap the capture button to take a photo.

Android

Pass parameters as Intent extras when launching com.fetchsky.facialrecognitionlitesdk.MainActivity:

Intent intent = new Intent(this, com.fetchsky.facialrecognitionlitesdk.MainActivity.class);
intent.putExtra("facialImage", base64ImageString);
intent.putExtra("blurThreshold", 100); // Optional
intent.putExtra("autoCaptureTimeoutSeconds", 10); // Optional
startActivity(intent);

iOS

Pass parameters to the FacialRecognitionController initializer:

let facialController = FacialRecognitionController(
source: base64String,
blurThreshold: 100,
autoCaptureDuration: 10.0
)