smartfaceIdentifyActivity method

Future<void> smartfaceIdentifyActivity({
  1. dynamic onIdentify(
    1. dynamic
    )?,
  2. bool? keepIdentification,
  3. bool? enableCheckImageQuality = true,
  4. int? identifyTimeout,
  5. bool? livenessEnabled,
  6. double? livenessSecurityLevel,
  7. double? securityLevel,
  8. bool? saveImage = false,
  9. SmartfaceCameraPosition? cameraPosition,
})

Starts the native identification activity without embedding a Flutter PlatformView.

Prefer identifyWidget when the Flutter app owns the surrounding screen. Use this method when the integration should delegate the full capture experience to the native layer.

Scale note:

  • securityLevel uses the public SmartfaceMobile scale from 0 to 100.
  • livenessSecurityLevel also uses 0 to 100.

Implementation

Future<void> smartfaceIdentifyActivity({
  Function(dynamic)? onIdentify,
  bool? keepIdentification,
  bool? enableCheckImageQuality = true,
  int? identifyTimeout,
  bool? livenessEnabled,
  double? livenessSecurityLevel,
  double? securityLevel,
  bool? saveImage = false,
  SmartfaceCameraPosition? cameraPosition,
}) async {
  registerCallback("onIdentify", onIdentify ?? (_) {});
  await methodChannel.invokeMethod('smartfaceIdentifyActivity', {
    'identifyCallBackId': 0,
    'keepIdentification': keepIdentification,
    'enableCheckImageQuality': enableCheckImageQuality,
    'identifyTimeout': identifyTimeout,
    'securityLevel': securityLevel,
    'livenessEnabled': livenessEnabled,
    'livenessSecurityLevel': livenessSecurityLevel,
    'saveImage': saveImage,
    'cameraSelected':
        cameraPosition == SmartfaceCameraPosition.back ? "0" : "1",
  });
}