Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions) Summary: [Ctors](https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#inhmethods)

# EmbeddedBiometricPrompt.Builder

*** ** * ** ***


`
public
static
final

class
EmbeddedBiometricPrompt.Builder
`


`

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


`

`


`

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

<br />

*** ** * ** ***

A builder for the embedded version of BiometricPrompt that collects arguments to be shown on
the system-provided biometric dialog.

## Summary

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

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.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. |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#build()() ` Creates an `https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt`. |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setAllowedAuthenticators(int)(int authenticators) ` Optional: Specifies the type(s) of authenticators that may be invoked. |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setAuthenticationCallback(java.util.concurrent.Executor,%20android.hardware.biometrics.EmbeddedBiometricPrompt.AuthenticationCallback)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.AuthenticationCallback callback) ` Optional: Sets the authentication callback and executor. |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setAuthenticationPurpose(int)(int purpose) ` Optional: Sets the authentication purpose for the prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.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/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.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 device credential fallback page (when the user is authenticating with PIN/pattern/password). |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setDescription(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence description) ` Optional: Sets a description that will be shown on the device credential fallback page (when the user is authenticating with PIN/pattern/password). |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setEmbeddedContentFactory(android.hardware.biometrics.EmbeddedBiometricPrompt.EmbeddedContentFactory)(https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.EmbeddedContentFactory contentFactory) ` Sets the factory that will create the content to display above the biometric prompt as a connected sheet. |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setExistingAuthSessionId(long)(long authSessionId) ` Optional: Sets the id for an existing authentication session. |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.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 device credential fallback page (when the user is authenticating with PIN/pattern/password). |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.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 device credential fallback page (when the user is authenticating with PIN/pattern/password). |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setLogoRes(int)(int logoRes) ` Optional: Sets the drawable resource of the logo that will be shown on the device credential fallback page (when the user is authenticating with PIN/pattern/password). |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.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/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setNextTranslationOffset(int)(int nextTranslationOffset) ` Optional: Sets the ending target layout translation offset in pixels (px) for the disappear (exit) animation of the biometric prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setPreviousTranslationOffset(int)(int previousTranslationOffset) ` Optional: Sets the starting layout translation offset in pixels (px) for the appear (entry) animation of the biometric prompt. |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setSubtitle(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence subtitle) ` Optional: Sets a subtitle that will be shown on the device credential fallback page (when the user is authenticating with PIN/pattern/password). |
| ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder` | ` https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setTitle(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence title) ` Required: Sets the title that will be shown on the device credential fallback page (when the user is authenticating with PIN/pattern/password). |

### 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 [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

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

Creates a builder for an embedded `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. This value cannot be `null`. <br /> |

## Public methods

### addFallbackOption

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

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

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

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: The text to display for the fallback option. This value cannot be `null`. <br /> |
| `iconType` | `int`: The icon to display 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`: The executor to use for the click listener. 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`: The click listener to use for the fallback option. This value cannot be `null`. <br /> |

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

### build

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

```
public EmbeddedBiometricPrompt build ()
```

Creates an `https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt` | The created `https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt`. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the factory to create embedded content is not provided. |

### setAllowedAuthenticators

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

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

Optional: Specifies the type(s) of authenticators that may be invoked.

<br />

| Parameters ||
|---|---|
| `authenticators` | `int`: A bit field representing the type(s) of authenticators 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/EmbeddedBiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setAuthenticationCallback

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

```
public EmbeddedBiometricPrompt.Builder setAuthenticationCallback (Executor executor, 
                EmbeddedBiometricPrompt.AuthenticationCallback callback)
```

Optional: Sets the authentication callback and executor.

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The executor to use for the authentication 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 /> |
| `callback` | `EmbeddedBiometricPrompt.AuthenticationCallback`: The authentication callback. This value cannot be `null`. <br /> |

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

### setAuthenticationPurpose

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

```
public EmbeddedBiometricPrompt.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/EmbeddedBiometricPrompt.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/EmbeddedBiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setConfirmationRequired

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

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

Optional: Sets a hint to the system for whether to require user confirmation after
authentication.

<br />

| Parameters ||
|---|---|
| `requireConfirmation` | `boolean`: Whether to require user confirmation. <br /> |

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

### setContentView

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

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

Optional: Sets application customized content view that will be shown on the device
credential fallback page (when the user is authenticating with PIN/pattern/password).

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

<br />

| Parameters ||
|---|---|
| `view` | `PromptContentView`: The customized view information to display on the credential page. This value cannot be `null`. <br /> |

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

### setDescription

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

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

Optional: Sets a description that will be shown on the device credential fallback page
(when the user is authenticating with PIN/pattern/password).

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

<br />

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

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

### setEmbeddedContentFactory

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

```
public EmbeddedBiometricPrompt.Builder setEmbeddedContentFactory (EmbeddedBiometricPrompt.EmbeddedContentFactory contentFactory)
```

Sets the factory that will create the content to display above the biometric prompt as a
connected sheet.

<br />

| Parameters ||
|---|---|
| `contentFactory` | `EmbeddedBiometricPrompt.EmbeddedContentFactory`: The factory to use to create the content view. This value cannot be `null`. <br /> |

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

### setExistingAuthSessionId

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

```
public EmbeddedBiometricPrompt.Builder setExistingAuthSessionId (long authSessionId)
```

Optional: Sets the id for an existing authentication session.

<br />

| Parameters ||
|---|---|
| `authSessionId` | `long`: The id for an existing authentication session. <br /> |

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

### setLogoBitmap

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

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

Optional: Sets the bitmap drawable of the logo that will be shown on the device
credential fallback page (when the user is authenticating with PIN/pattern/password).

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 credential page. This value cannot be `null`. <br /> |

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

### setLogoDescription

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

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

Optional: Sets logo description text that will be shown on the device credential
fallback page (when the user is authenticating with PIN/pattern/password).

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 credential page. This value cannot be `null`. <br /> |

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

### setLogoRes

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

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

Optional: Sets the drawable resource of the logo that will be shown on the device
credential fallback page (when the user is authenticating with PIN/pattern/password).

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 credential page. <br /> |

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

### setNegativeButton

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

```
public EmbeddedBiometricPrompt.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/EmbeddedBiometricPrompt.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/EmbeddedBiometricPrompt.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/EmbeddedBiometricPrompt.Builder#setAllowedAuthenticators(int)`.
To use credential authentication and
provide custom behavior, use
`https://developer.android.com/reference/android/hardware/biometrics/EmbeddedBiometricPrompt.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/EmbeddedBiometricPrompt.Builder` | This builder. This value cannot be `null`. <br /> |

### setNextTranslationOffset

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

```
public EmbeddedBiometricPrompt.Builder setNextTranslationOffset (int nextTranslationOffset)
```

Optional: Sets the ending target layout translation offset in pixels (px) for the
disappear (exit) animation of the biometric prompt.

When the prompt is dismissed, it animates from its resting position to this
target layout offset.

In portrait mode, the offset is applied vertically along the Y-axis (vertical slide).

In landscape mode, the offset is applied horizontally along the X-axis
(horizontal slide), relative to the display boundaries based on the current
screen rotation (e.g. 90 or 270 degrees).

This absolute pixel value can be used to synchronize the exit of the prompt with
the entry animation of a subsequent screen in the client application.

<br />

| Parameters ||
|---|---|
| `nextTranslationOffset` | `int`: The ending target translation offset in pixels (px). <br /> |

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

### setPreviousTranslationOffset

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

```
public EmbeddedBiometricPrompt.Builder setPreviousTranslationOffset (int previousTranslationOffset)
```

Optional: Sets the starting layout translation offset in pixels (px) for the
appear (entry) animation of the biometric prompt.

When the prompt is shown, its initial position is translated by this offset
relative to its final resting position, and it animates to its final centered position
(0 translation). If not set, or set to -1, a default system vertical translation is used.

In portrait mode, the offset is applied vertically along the Y-axis.

This absolute pixel value can be used to synchronize the entry of the prompt
with the exit animation of a preceding screen in the client application.

<br />

| Parameters ||
|---|---|
| `previousTranslationOffset` | `int`: The starting translation offset in pixels (px). <br /> |

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

### setSubtitle

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

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

Optional: Sets a subtitle that will be shown on the device credential fallback page
(when the user is authenticating with PIN/pattern/password).

<br />

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

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

### setTitle

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

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

Required: Sets the title that will be shown on the device credential fallback page
(when the user is authenticating with PIN/pattern/password).

<br />

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

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