smartfaceIdentifyActivity method

Future<void> smartfaceIdentifyActivity({
  1. dynamic onIdentify(
    1. dynamic
    )?,
  2. bool? keepIdentification,
  3. bool? ellipseScreenEnabled = false,
  4. bool? showUserInformation = true,
  5. bool? showTimeInformation = false,
  6. bool? showErrorDialog = true,
  7. bool? enableCheckImageQuality = true,
  8. int? identifyTimeout,
  9. bool? livenessEnabled,
  10. double? livenessSecurityLevel,
  11. double? securityLevel,
  12. bool? saveImage = false,
  13. bool? vibratorEnabled = true,
  14. int? vibratorTime,
  15. 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? ellipseScreenEnabled = false,
  bool? showUserInformation = true,
  bool? showTimeInformation = false,
  bool? showErrorDialog = true,
  bool? enableCheckImageQuality = true,
  int? identifyTimeout,
  bool? livenessEnabled,
  double? livenessSecurityLevel,
  double? securityLevel,
  bool? saveImage = false,
  bool? vibratorEnabled = true,
  int? vibratorTime,
  SmartfaceCameraPosition? cameraPosition,
}) async {
  registerCallback("onIdentify", onIdentify ?? (_) {});
  await methodChannel.invokeMethod('smartfaceIdentifyActivity', {
    'identifyCallBackId': 0,
    'keepIdentification': keepIdentification,
    'ellipseScreenEnabled': ellipseScreenEnabled,
    'showUserInformation': showUserInformation,
    'showTimeInformation': showTimeInformation,
    'showErrorDialog': showErrorDialog,
    'enableCheckImageQuality': enableCheckImageQuality,
    'identifyTimeout': identifyTimeout,
    'securityLevel': securityLevel,
    'livenessEnabled': livenessEnabled,
    'livenessSecurityLevel': livenessSecurityLevel,
    'saveImage': saveImage,
    'vibratorEnabled': vibratorEnabled,
    'vibratorTime': vibratorTime,
    'cameraSelected':
        cameraPosition == SmartfaceCameraPosition.back ? "0" : "1",
  });
}