EmbeddedBiometricPrompt.StartAuthenticationSession Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts an authentication session for embedded BiometricPrompt.
[Android.Runtime.Register("startAuthenticationSession", "(Landroid/os/CancellationSignal;ILjava/util/concurrent/Executor;Landroid/hardware/biometrics/EmbeddedBiometricPrompt$AuthenticationCallback;)V", "", ApiSince=37)]
public void StartAuthenticationSession(Android.OS.CancellationSignal cancel, Android.Hardware.Biometrics.EmbeddedBiometricPromptStartMode startMode, Java.Util.Concurrent.IExecutor executor, Android.Hardware.Biometrics.EmbeddedBiometricPrompt.AuthenticationCallback callback);
[<Android.Runtime.Register("startAuthenticationSession", "(Landroid/os/CancellationSignal;ILjava/util/concurrent/Executor;Landroid/hardware/biometrics/EmbeddedBiometricPrompt$AuthenticationCallback;)V", "", ApiSince=37)>]
member this.StartAuthenticationSession : Android.OS.CancellationSignal * Android.Hardware.Biometrics.EmbeddedBiometricPromptStartMode * Java.Util.Concurrent.IExecutor * Android.Hardware.Biometrics.EmbeddedBiometricPrompt.AuthenticationCallback -> unit
Parameters
- cancel
- CancellationSignal
An object that can be used to cancel authentication. This value cannot be null.
- startMode
- EmbeddedBiometricPromptStartMode
The mode determining when authentication starts (e.g. START_MODE_IMMEDIATE, START_MODE_IMMEDIATE_UNLESS_OCCLUDED, or START_MODE_DEFERRED). Value is one of the following: START_MODE_IMMEDIATE; START_MODE_IMMEDIATE_UNLESS_OCCLUDED; START_MODE_DEFERRED
- executor
- IExecutor
An executor to handle callback events. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.
An object to receive authentication events. This value cannot be null.
- Attributes
Remarks
Starts an authentication session for embedded BiometricPrompt. This call warms up the biometric hardware, displays a system-provided dialog, and starts scanning for a biometric. Authentication starts when AuthenticationCallback.onSessionStarted(long) is called, terminates when AuthenticationCallback.onAuthenticationError(int,CharSequence) is called, when AuthenticationCallback.onAuthenticationSucceeded(BiometricPrompt.AuthenticationResult) is called, or when the user dismisses the system-provided dialog. This operation can be canceled by using the provided cancel object. The application will receive authentication errors through AuthenticationCallback, and button events through the corresponding callback set in Builder.addFallbackOption(CharSequence,int,Executor,DialogInterface.OnClickListener).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.