PromptContentViewWithMoreOptionsButton


class PromptContentViewWithMoreOptionsButton : PromptContentView, Parcelable
kotlin.Any
   ↳ android.hardware.biometrics.PromptContentViewWithMoreOptionsButton

Contains the information of the template of content view with a more options button for Biometric Prompt.

This button should be used to provide more options for sign in or other purposes, such as when a user needs to select between multiple app-specific accounts or profiles that are available for sign in.

Apps should avoid using this when possible because it will create additional steps that the user must navigate through - clicking the more options button will dismiss the prompt, provide the app an opportunity to ask the user for the correct option, and finally allow the app to decide how to proceed once selected.

Here's how you'd set a PromptContentViewWithMoreOptionsButton on a Biometric Prompt:

BiometricPrompt biometricPrompt = new BiometricPrompt.Builder(...)
      .setTitle(...)
      .setSubTitle(...)
      .setContentView(new PromptContentViewWithMoreOptionsButton.Builder()
          .setDescription("test description")
          .setMoreOptionsButtonListener(executor, listener)
          .build())
      .build();
  

Summary

Nested classes

A builder that collects arguments to be shown on the content view with more options button.

Inherited constants
Public methods
Int

String?

Gets the description for the content view, as set by PromptContentViewWithMoreOptionsButton.Builder#setDescription(String).

DialogInterface.OnClickListener

Gets the click listener for the more options button on the content view, as set by PromptContentViewWithMoreOptionsButton.Builder#setMoreOptionsButtonListener(Executor,.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<PromptContentViewWithMoreOptionsButton!>

Public methods

describeContents

fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getDescription

fun getDescription(): String?

Gets the description for the content view, as set by PromptContentViewWithMoreOptionsButton.Builder#setDescription(String).
Requires android.Manifest.permission#SET_BIOMETRIC_DIALOG_ADVANCED

Return
String? The description for the content view, or null if the content view has no description.

getMoreOptionsButtonListener

fun getMoreOptionsButtonListener(): DialogInterface.OnClickListener

Gets the click listener for the more options button on the content view, as set by PromptContentViewWithMoreOptionsButton.Builder#setMoreOptionsButtonListener(Executor,.
Requires android.Manifest.permission#SET_BIOMETRIC_DIALOG_ADVANCED

Return
DialogInterface.OnClickListener The click listener for the more options button on the content view. This value cannot be null.

writeToParcel

fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties