Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#inhmethods)

# BiometricPrompt.Builder

*** ** * ** ***


`
public
static


class
BiometricPrompt.Builder
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.hardware.biometrics.BiometricPrompt.Builder |

<br />

*** ** * ** ***

A builder that collects arguments to be shown on the system-provided biometric dialog.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#Builder(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` Creates a builder for a `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt` dialog. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#addFallbackOption(java.lang.CharSequence,%20int,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)(https://developer.android.com/reference/java/lang/CharSequence text, int iconType, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/content/DialogInterface.OnClickListener listener) ` Optional: Sets the text, icon, executor, and click listener for a fallback option in biometric prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#build()() ` Creates a `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt`. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAllowedAuthenticators(int)(int authenticators) ` Optional: Specifies the type(s) of authenticators that may be invoked by `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt` to authenticate the user. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAuthenticationPurpose(int)(int purpose) ` Optional: Sets the authentication purpose for the prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setConfirmationRequired(boolean)(boolean requireConfirmation) ` Optional: Sets a hint to the system for whether to require user confirmation after authentication. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setContentView(android.hardware.biometrics.PromptContentView)(https://developer.android.com/reference/android/hardware/biometrics/PromptContentView view) ` Optional: Sets application customized content view that will be shown on the prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setDescription(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence description) ` Optional: Sets a description that will be shown on the prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setDeviceCredentialAllowed(boolean)(boolean allowed) ` *This method was deprecated in API level 30. Replaced by `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAllowedAuthenticators(int)`.* |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setLogoBitmap(android.graphics.Bitmap)(https://developer.android.com/reference/android/graphics/Bitmap logoBitmap) ` Optional: Sets the bitmap drawable of the logo that will be shown on the prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setLogoDescription(java.lang.String)(https://developer.android.com/reference/java/lang/String logoDescription) ` Optional: Sets logo description text that will be shown on the prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setLogoRes(int)(int logoRes) ` Optional: Sets the drawable resource of the logo that will be shown on the prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setNegativeButton(java.lang.CharSequence,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)(https://developer.android.com/reference/java/lang/CharSequence text, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/content/DialogInterface.OnClickListener listener) ` Optional: Sets the text, executor, and click listener for the negative button on the prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setSubtitle(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence subtitle) ` Optional: Sets a subtitle that will be shown on the prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setTitle(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence title) ` Required: Sets the title that will be shown on the prompt. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Public constructors

### Builder

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder (Context context)
```

Creates a builder for a `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt` dialog.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The `https://developer.android.com/reference/android/content/Context` that will be used to build the prompt. <br /> |

## Public methods

### addFallbackOption

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public BiometricPrompt.Builder addFallbackOption (CharSequence text, 
                int iconType, 
                Executor executor, 
                DialogInterface.OnClickListener listener)
```

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 `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAllowedAuthenticators(int)`, it will
count as a fallback option.

If a fallback option is not provided and
`https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setNegativeButton(java.lang.CharSequence,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)` is
not set, the option to use device credential will be
shown as the negative button if allowed in `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAllowedAuthenticators(int)`. If
credential is not allowed, "Cancel" will be shown as the negative button.

A maximum of `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt#getMaxFallbackOptions()` fallback options can be added. This
number does not include device credential authentication.

**Note: These fallback options will not be displayed if
`https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setNegativeButton(java.lang.CharSequence,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)` is
set**

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: Text to be shown on the fallback option for the prompt. This value cannot be `null`. <br /> |
| `iconType` | `int`: Icon to be shown for the fallback option. Value is one of the following: - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#ICON_TYPE_PASSWORD` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#ICON_TYPE_QR_CODE` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#ICON_TYPE_ACCOUNT` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#ICON_TYPE_GENERIC` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#ICON_TYPE_SETTING` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#ICON_TYPE_RESET` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#ICON_TYPE_MESSAGE` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#ICON_TYPE_SUPERVISED` |
| `executor` | `Executor`: Executor that will be used to run the on click callback. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `listener` | `DialogInterface.OnClickListener`: Listener containing a callback to be run when the button is pressed. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### build

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt build ()
```

Creates a `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt` | An instance of `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt`. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If any required fields are unset, or if given any invalid combination of field values. |

### setAllowedAuthenticators

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setAllowedAuthenticators (int authenticators)
```

Optional: Specifies the type(s) of authenticators that may be invoked by
`https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt` to authenticate the user. Available authenticator types are
defined in `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Authenticators` and can be combined via bitwise OR. Defaults to:

- `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Authenticators#BIOMETRIC_WEAK` for non-crypto authentication, or
- `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Authenticators#BIOMETRIC_STRONG` for crypto-based authentication.

If this method is used and no authenticator of any of the specified types is available
at the time `BiometricPrompt#authenticate(...)` is called, authentication will
be canceled and `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.AuthenticationCallback#onAuthenticationError(int,%20java.lang.CharSequence)`
will be invoked with an appropriate error code.

This method should be preferred over `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setDeviceCredentialAllowed(boolean)` and
overrides the latter if both are used. Using this method to enable device credential
authentication (with `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Authenticators#DEVICE_CREDENTIAL`) will replace the negative
button on the prompt, making it an error to also call
`https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setNegativeButton(java.lang.CharSequence,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)`.

If unlocking cryptographic operation(s), it is the application's responsibility to
request authentication with the proper set of authenticators (e.g. match the
authenticators specified during key generation).

<br />

| Parameters ||
|---|---|
| `authenticators` | `int`: A bit field representing all valid authenticator types that may be invoked by the prompt. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Authenticators#BIOMETRIC_STRONG` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Authenticators#BIOMETRIC_WEAK` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Authenticators#DEVICE_CREDENTIAL` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Authenticators#IDENTITY_CHECK` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder`
- `https://developer.android.com/reference/android/security/keystore/KeyProperties#AUTH_BIOMETRIC_STRONG`
- `https://developer.android.com/reference/android/security/keystore/KeyProperties#AUTH_DEVICE_CREDENTIAL`

### setAuthenticationPurpose

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public BiometricPrompt.Builder setAuthenticationPurpose (int purpose)
```

Optional: Sets the authentication purpose for the prompt.

Provides a hint to customize the `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt` appearance to clarify what
the user is authorizing. This is cosmetic only, can vary by device, and does not change
security guarantees (see `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAllowedAuthenticators(int)`).

For example, this may inform the user to click or tap "to pay" instead of "to
authenticate".

<br />

| Parameters ||
|---|---|
| `purpose` | `int`: The authentication purpose to set. Value is one of the following: - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#AUTHENTICATION_PURPOSE_UNKNOWN` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#AUTHENTICATION_PURPOSE_PAYMENT` - `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#AUTHENTICATION_PURPOSE_LOGIN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setConfirmationRequired

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setConfirmationRequired (boolean requireConfirmation)
```

Optional: Sets a hint to the system for whether to require user confirmation after
authentication. For example, implicit modalities like face and iris are passive, meaning
they don't require an explicit user action to complete authentication. If set to true,
these modalities should require the user to take some action (e.g. press a button)
before `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.AuthenticationCallback#onAuthenticationSucceeded(android.hardware.biometrics.BiometricPrompt.AuthenticationResult)` is
called. Defaults to true.

A typical use case for not requiring confirmation would be for low-risk transactions,
such as re-authenticating a recently authenticated application. A typical use case for
requiring confirmation would be for authorizing a purchase.

Note that this just passes a hint to the system, which the system may then ignore. For
example, a value of false may be ignored if the user has disabled implicit authentication
in Settings, or if it does not apply to a particular modality (e.g. fingerprint).

<br />

| Parameters ||
|---|---|
| `requireConfirmation` | `boolean`: true if explicit user confirmation should be required, or false otherwise. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setContentView

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setContentView (PromptContentView view)
```

Optional: Sets application customized content view that will be shown on the prompt.

Note that the description set by `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setDescription(java.lang.CharSequence)` will be
overridden by `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setContentView(android.hardware.biometrics.PromptContentView)`. The view provided to
`https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setContentView(android.hardware.biometrics.PromptContentView)` will be used if both methods are
called.

<br />

| Parameters ||
|---|---|
| `view` | `PromptContentView`: The customized view information. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setDescription

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setDescription (CharSequence description)
```

Optional: Sets a description that will be shown on the prompt.

Note that the description set by `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setDescription(java.lang.CharSequence)` will be
overridden by `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setContentView(android.hardware.biometrics.PromptContentView)`. The view provided to
`https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setContentView(android.hardware.biometrics.PromptContentView)` will be used if both methods are
called.

<br />

| Parameters ||
|---|---|
| `description` | `CharSequence`: The description to display. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setDeviceCredentialAllowed

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setDeviceCredentialAllowed (boolean allowed)
```


**This method was deprecated
in API level 30.**   

Replaced by `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAllowedAuthenticators(int)`.

Optional: If enabled, the user will be given the option to authenticate with their device
PIN, pattern, or password. Developers should first check `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#canAuthenticate(int)` for `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Authenticators#DEVICE_CREDENTIAL`
before enabling. If the device is not secured with a credential,
`https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.AuthenticationCallback#onAuthenticationError(int,%20java.lang.CharSequence)` will be invoked
with `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt#BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL`. Defaults to false.

Note that enabling this option replaces the negative button on the prompt with one
that allows the user to authenticate with their device credential, making it an error to
call `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setNegativeButton(java.lang.CharSequence,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)`.

<br />

| Parameters ||
|---|---|
| `allowed` | `boolean`: true if the prompt should fall back to asking for the user's device credential (PIN/pattern/password), or false otherwise. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setLogoBitmap

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setLogoBitmap (Bitmap logoBitmap)
```

Optional: Sets the bitmap drawable of the logo that will be shown on the prompt.

Note that using this method is not recommended in most scenarios because the calling
application's icon will be used by default. Setting the logo is intended for large
bundled applications that perform a wide range of functions and need to show distinct
icons for each function.


Requires `https://developer.android.com/reference/android/Manifest.permission#SET_BIOMETRIC_DIALOG_ADVANCED`

<br />

| Parameters ||
|---|---|
| `logoBitmap` | `Bitmap`: A bitmap drawable of the logo that will be shown on the prompt. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setLogoDescription

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setLogoDescription (String logoDescription)
```

Optional: Sets logo description text that will be shown on the prompt.

Note that using this method is not recommended in most scenarios because the calling
application's name will be used by default. Setting the logo description is intended for
large bundled applications that perform a wide range of functions and need to show
distinct description for each function.


Requires `https://developer.android.com/reference/android/Manifest.permission#SET_BIOMETRIC_DIALOG_ADVANCED`

<br />

| Parameters ||
|---|---|
| `logoDescription` | `String`: The logo description text that will be shown on the prompt. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If logo description is null. |

### setLogoRes

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setLogoRes (int logoRes)
```

Optional: Sets the drawable resource of the logo that will be shown on the prompt.

Note that using this method is not recommended in most scenarios because the calling
application's icon will be used by default. Setting the logo is intended for large
bundled applications that perform a wide range of functions and need to show distinct
icons for each function.


Requires `https://developer.android.com/reference/android/Manifest.permission#SET_BIOMETRIC_DIALOG_ADVANCED`

<br />

| Parameters ||
|---|---|
| `logoRes` | `int`: A drawable resource of the logo that will be shown on the prompt. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setNegativeButton

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setNegativeButton (CharSequence text, 
                Executor executor, 
                DialogInterface.OnClickListener listener)
```

Optional: Sets the text, executor, and click listener for the negative button on the
prompt. This is typically a cancel button, but may be also used to show an alternative
method for authentication, such as a screen that asks for a backup password.

If not provided and no fallback is added through
`https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#addFallbackOption(java.lang.CharSequence,%20int,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)`
(API 36.1 and later),
the option to use device credential will be
shown as the negative button if allowed in `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAllowedAuthenticators(int)`. If
credential is not allowed, "Cancel" will be shown as the negative button.

In API 36 and earlier, this setting is required. Note that this setting is not
required, and in fact is explicitly disallowed, if
device credential authentication is enabled via `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAllowedAuthenticators(int)`
or
`https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setDeviceCredentialAllowed(boolean)`. To use credential authentication and
provide custom behavior, use
`https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#addFallbackOption(java.lang.CharSequence,%20int,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)`

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: Text to be shown on the negative button for the prompt. This value cannot be `null`. <br /> |
| `executor` | `Executor`: Executor that will be used to run the on click callback. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `listener` | `DialogInterface.OnClickListener`: Listener containing a callback to be run when the button is pressed. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setSubtitle

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setSubtitle (CharSequence subtitle)
```

Optional: Sets a subtitle that will be shown on the prompt.

<br />

| Parameters ||
|---|---|
| `subtitle` | `CharSequence`: The subtitle to display. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setTitle

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BiometricPrompt.Builder setTitle (CharSequence title)
```

Required: Sets the title that will be shown on the prompt.

<br />

| Parameters ||
|---|---|
| `title` | `CharSequence`: The title to display. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |