BiometricPrompt.PromptInfo

class BiometricPrompt.PromptInfo


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

Summary

Nested types

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

Public functions

Int

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

CharSequence?

Gets the description for the prompt.

CharSequence

Gets the text for the negative button on the prompt.

CharSequence?

Gets the subtitle for the prompt.

CharSequence

Gets the title for the prompt.

Boolean

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

Boolean

This function is deprecated.

Will be removed with setDeviceCredentialAllowed.

Public functions

getAllowedAuthenticators

Added in 1.1.0
@BiometricManager.AuthenticatorTypes
fun getAllowedAuthenticators(): Int

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

Added in 1.0.0
fun getDescription(): CharSequence?

Gets the description for the prompt.

Returns
CharSequence?

The description to be displayed on the prompt.

See also
setDescription

getNegativeButtonText

Added in 1.0.0
fun getNegativeButtonText(): CharSequence

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

Added in 1.0.0
fun getSubtitle(): CharSequence?

Gets the subtitle for the prompt.

Returns
CharSequence?

The subtitle to be displayed on the prompt.

See also
setSubtitle

getTitle

Added in 1.0.0
fun getTitle(): CharSequence

Gets the title for the prompt.

Returns
CharSequence

The title to be displayed on the prompt.

See also
setTitle

isConfirmationRequired

Added in 1.0.0
fun isConfirmationRequired(): Boolean

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

Returns
Boolean

Whether this option is enabled.

isDeviceCredentialAllowed

Added in 1.0.0
Deprecated in 1.1.0
fun isDeviceCredentialAllowed(): Boolean

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

Returns
Boolean

Whether this option is enabled.