Google is committed to advancing racial equity for Black communities. See how.

BiometricPrompt.PromptInfo

public static class BiometricPrompt.PromptInfo
extends Object

java.lang.Object
   ↳ androidx.biometric.BiometricPrompt.PromptInfo


A set of configurable options for how the BiometricPrompt should appear and behave.

Summary

Nested classes

class BiometricPrompt.PromptInfo.Builder

A builder used to set individual options for the BiometricPrompt.PromptInfo class. 

Public methods

int getAllowedAuthenticators()

Gets the type(s) of authenticators that may be invoked by the prompt.

CharSequence getDescription()

Gets the description for the prompt.

CharSequence getNegativeButtonText()

Gets the text for the negative button on the prompt.

CharSequence getSubtitle()

Gets the subtitle for the prompt.

CharSequence getTitle()

Gets the title for the prompt.

boolean isConfirmationRequired()

Checks if the confirmation required option is enabled for the prompt.

boolean isDeviceCredentialAllowed()

This method is deprecated. Will be removed with BiometricPrompt.PromptInfo.Builder.setDeviceCredentialAllowed(boolean).

Inherited methods

Public methods

getAllowedAuthenticators

public int getAllowedAuthenticators ()

Gets the type(s) of authenticators that may be invoked by the prompt.

Returns
int A bit field representing all valid authenticator types that may be invoked by the prompt, or 0 if not set.

getDescription

public CharSequence getDescription ()

Gets the description for the prompt.

Returns
CharSequence The description to be displayed on the prompt.

getNegativeButtonText

public CharSequence getNegativeButtonText ()

Gets the text for the negative button on the prompt.

Returns
CharSequence The label to be used for the negative button on the prompt, or an empty string if not set.

getSubtitle

public CharSequence getSubtitle ()

Gets the subtitle for the prompt.

Returns
CharSequence The subtitle to be displayed on the prompt.

getTitle

public CharSequence getTitle ()

Gets the title for the prompt.

Returns
CharSequence The title to be displayed on the prompt.

isConfirmationRequired

public boolean isConfirmationRequired ()

Checks if the confirmation required option is enabled for the prompt.

Returns
boolean Whether this option is enabled.

isDeviceCredentialAllowed

public boolean isDeviceCredentialAllowed ()

This method is deprecated.
Will be removed with BiometricPrompt.PromptInfo.Builder.setDeviceCredentialAllowed(boolean).

Checks if the device credential allowed option is enabled for the prompt.

Returns
boolean Whether this option is enabled.