Language

BiometricPrompt.Builder.AddFallbackOption Method

Definition

Overloads

Name Description
AddFallbackOption(ICharSequence, Int32, IExecutor, IDialogInterfaceOnClickListener)

Optional: Sets the text, icon, executor, and click listener for a fallback option in biometric prompt.

AddFallbackOption(String, Int32, IExecutor, IDialogInterfaceOnClickListener)

Optional: Sets the text, icon, executor, and click listener for a fallback option in biometric prompt.

AddFallbackOption(ICharSequence, Int32, IExecutor, IDialogInterfaceOnClickListener)

Optional: Sets the text, icon, executor, and click listener for a fallback option in biometric prompt.

[Android.Runtime.Register("addFallbackOption", "(Ljava/lang/CharSequence;ILjava/util/concurrent/Executor;Landroid/content/DialogInterface$OnClickListener;)Landroid/hardware/biometrics/BiometricPrompt$Builder;", "GetAddFallbackOption_Ljava_lang_CharSequence_ILjava_util_concurrent_Executor_Landroid_content_DialogInterface_OnClickListener_Handler", ApiSince=36)]
public virtual Android.Hardware.Biometrics.BiometricPrompt.Builder AddFallbackOption(Java.Lang.ICharSequence text, int iconType, Java.Util.Concurrent.IExecutor executor, Android.Content.IDialogInterfaceOnClickListener listener);
[<Android.Runtime.Register("addFallbackOption", "(Ljava/lang/CharSequence;ILjava/util/concurrent/Executor;Landroid/content/DialogInterface$OnClickListener;)Landroid/hardware/biometrics/BiometricPrompt$Builder;", "GetAddFallbackOption_Ljava_lang_CharSequence_ILjava_util_concurrent_Executor_Landroid_content_DialogInterface_OnClickListener_Handler", ApiSince=36)>]
abstract member AddFallbackOption : Java.Lang.ICharSequence * int * Java.Util.Concurrent.IExecutor * Android.Content.IDialogInterfaceOnClickListener -> Android.Hardware.Biometrics.BiometricPrompt.Builder
override this.AddFallbackOption : Java.Lang.ICharSequence * int * Java.Util.Concurrent.IExecutor * Android.Content.IDialogInterfaceOnClickListener -> Android.Hardware.Biometrics.BiometricPrompt.Builder

Parameters

text
ICharSequence

Text to be shown on the fallback option for the prompt. This value cannot be null.

iconType
Int32

Icon to be shown for the fallback option. Value is one of the following: BiometricManager.ICON_TYPE_PASSWORD; BiometricManager.ICON_TYPE_QR_CODE; BiometricManager.ICON_TYPE_ACCOUNT; BiometricManager.ICON_TYPE_GENERIC; BiometricManager.ICON_TYPE_SETTING; BiometricManager.ICON_TYPE_RESET; BiometricManager.ICON_TYPE_MESSAGE; BiometricManager.ICON_TYPE_SUPERVISED

executor
IExecutor

Executor that will be used to run the on click callback. 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.

listener
IDialogInterfaceOnClickListener

Listener containing a callback to be run when the button is pressed. This value cannot be null.

Returns

This builder. This value cannot be null.

Attributes

Remarks

Optional: Sets the text, icon, executor, and click listener for a fallback option in biometric prompt.

Fallback option is displayed as the negative button in prompt authentication screen if it is the only option and will display in a list in the fallback options page if there are more than one. If device credential authentication is allowed through setAllowedAuthenticators(int), it will count as a fallback option.

If a fallback option is not provided and setNegativeButton(CharSequence,Executor,DialogInterface.OnClickListener) is not set, the option to use device credential will be shown as the negative button if allowed in setAllowedAuthenticators(int). If credential is not allowed, "Cancel" will be shown as the negative button.

A maximum of BiometricPrompt.getMaxFallbackOptions() fallback options can be added. This number does not include device credential authentication.

Note: These fallback options will not be displayed if setNegativeButton(CharSequence,Executor,DialogInterface.OnClickListener) is set

Android reference for android.hardware.biometrics.BiometricPrompt.Builder.addFallbackOption.

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.

Applies to

AddFallbackOption(String, Int32, IExecutor, IDialogInterfaceOnClickListener)

Optional: Sets the text, icon, executor, and click listener for a fallback option in biometric prompt.

public Android.Hardware.Biometrics.BiometricPrompt.Builder AddFallbackOption(string text, int iconType, Java.Util.Concurrent.IExecutor executor, Android.Content.IDialogInterfaceOnClickListener listener);
member this.AddFallbackOption : string * int * Java.Util.Concurrent.IExecutor * Android.Content.IDialogInterfaceOnClickListener -> Android.Hardware.Biometrics.BiometricPrompt.Builder

Parameters

text
String

Text to be shown on the fallback option for the prompt. This value cannot be null.

iconType
Int32

Icon to be shown for the fallback option. Value is one of the following: BiometricManager.ICON_TYPE_PASSWORD; BiometricManager.ICON_TYPE_QR_CODE; BiometricManager.ICON_TYPE_ACCOUNT; BiometricManager.ICON_TYPE_GENERIC; BiometricManager.ICON_TYPE_SETTING; BiometricManager.ICON_TYPE_RESET; BiometricManager.ICON_TYPE_MESSAGE; BiometricManager.ICON_TYPE_SUPERVISED

executor
IExecutor

Executor that will be used to run the on click callback. 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.

listener
IDialogInterfaceOnClickListener

Listener containing a callback to be run when the button is pressed. This value cannot be null.

Returns

This builder. This value cannot be null.

Remarks

Optional: Sets the text, icon, executor, and click listener for a fallback option in biometric prompt.

Fallback option is displayed as the negative button in prompt authentication screen if it is the only option and will display in a list in the fallback options page if there are more than one. If device credential authentication is allowed through setAllowedAuthenticators(int), it will count as a fallback option.

If a fallback option is not provided and setNegativeButton(CharSequence,Executor,DialogInterface.OnClickListener) is not set, the option to use device credential will be shown as the negative button if allowed in setAllowedAuthenticators(int). If credential is not allowed, "Cancel" will be shown as the negative button.

A maximum of BiometricPrompt.getMaxFallbackOptions() fallback options can be added. This number does not include device credential authentication.

Note: These fallback options will not be displayed if setNegativeButton(CharSequence,Executor,DialogInterface.OnClickListener) is set

Android reference for android.hardware.biometrics.BiometricPrompt.Builder.addFallbackOption.

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.

Applies to