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

# Builder

*** ** * ** ***

```
class Builder
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.hardware.biometrics.EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) |

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/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#Builder(android.content.Context)(context: https://developer.android.com/reference/kotlin/android/content/Context.html#)` Creates a builder for an embedded `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricPrompt` dialog. |

| Public methods ||
|---|---|
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#addFallbackOption(kotlin.CharSequence,%20kotlin.Int,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)(text: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html, iconType: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html, executor: https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#, listener: https://developer.android.com/reference/kotlin/android/content/DialogInterface.OnClickListener.html#)` Optional: Sets the text, icon, executor, and click listener for a fallback option. |
| [EmbeddedBiometricPrompt](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#build()()` Creates an `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt`. |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setAllowedAuthenticators(kotlin.Int)(authenticators: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Optional: Specifies the type(s) of authenticators that may be invoked. |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setAuthenticationCallback(java.util.concurrent.Executor,%20android.hardware.biometrics.EmbeddedBiometricPrompt.AuthenticationCallback)(executor: https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#, callback: https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.AuthenticationCallback)` Optional: Sets the authentication callback and executor. |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setAuthenticationPurpose(kotlin.Int)(purpose: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Optional: Sets the authentication purpose for the prompt. |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setConfirmationRequired(kotlin.Boolean)(requireConfirmation: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` Optional: Sets a hint to the system for whether to require user confirmation after authentication. |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setContentView(android.hardware.biometrics.PromptContentView)(view: https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptContentView)` 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). |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setDescription(kotlin.CharSequence)(description: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)` Optional: Sets a description that will be shown on the device credential fallback page (when the user is authenticating with PIN/pattern/password). |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setEmbeddedContentFactory(android.hardware.biometrics.EmbeddedBiometricPrompt.EmbeddedContentFactory)(contentFactory: https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.EmbeddedContentFactory)` Sets the factory that will create the content to display above the biometric prompt as a connected sheet. |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setExistingAuthSessionId(kotlin.Long)(authSessionId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` Optional: Sets the id for an existing authentication session. |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setLogoBitmap(android.graphics.Bitmap)(logoBitmap: https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)` 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). |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setLogoDescription(kotlin.String)(logoDescription: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Optional: Sets logo description text that will be shown on the device credential fallback page (when the user is authenticating with PIN/pattern/password). |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setLogoRes(kotlin.Int)(logoRes: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` 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). |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setNegativeButton(kotlin.CharSequence,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)(text: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html, executor: https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#, listener: https://developer.android.com/reference/kotlin/android/content/DialogInterface.OnClickListener.html#)` Optional: Sets the text, executor, and click listener for the negative button on the prompt. |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setNextTranslationOffset(kotlin.Int)(nextTranslationOffset: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Optional: Sets the ending target layout translation offset in pixels (px) for the disappear (exit) animation of the biometric prompt. |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setPreviousTranslationOffset(kotlin.Int)(previousTranslationOffset: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Optional: Sets the starting layout translation offset in pixels (px) for the appear (entry) animation of the biometric prompt. |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setSubtitle(kotlin.CharSequence)(subtitle: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)` Optional: Sets a subtitle that will be shown on the device credential fallback page (when the user is authenticating with PIN/pattern/password). |
| [EmbeddedBiometricPrompt.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#) | `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setTitle(kotlin.CharSequence)(title: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)` Required: Sets the title that will be shown on the device credential fallback page (when the user is authenticating with PIN/pattern/password). |

## Public constructors

### Builder

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

```
Builder(context: Context)
```

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

| Parameters ||
|---|---|
| `context` | [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#): The `https://developer.android.com/reference/kotlin/android/content/Context.html#` that will be used to build the prompt. This value cannot be `null`. |

## Public methods

### addFallbackOption

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

```
fun addFallbackOption(
    text: CharSequence, 
    iconType: Int, 
    executor: Executor, 
    listener: DialogInterface.OnClickListener
): EmbeddedBiometricPrompt.Builder
```

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

| Parameters ||
|---|---|
| `text` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html): The text to display for the fallback option. This value cannot be `null`. |
| `iconType` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The icon to display for the fallback option. Value is one of the following: - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#ICON_TYPE_PASSWORD:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#ICON_TYPE_QR_CODE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#ICON_TYPE_ACCOUNT:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#ICON_TYPE_GENERIC:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#ICON_TYPE_SETTING:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#ICON_TYPE_RESET:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#ICON_TYPE_MESSAGE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#ICON_TYPE_SUPERVISED:kotlin.Int` |
| `executor` | [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#): 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/kotlin/java/util/concurrent/Executor.html#`, 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/kotlin/android/content/Context.html#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#` that dispatches to an appropriate thread. |
| `listener` | [DialogInterface.OnClickListener](https://developer.android.com/reference/kotlin/android/content/DialogInterface.OnClickListener.html#): The click listener to use for the fallback option. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### build

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

```
fun build(): EmbeddedBiometricPrompt
```

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

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt` | The created `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt`. This value cannot be `null`. |

| Exceptions ||
|---|---|
| `java.lang.IllegalArgumentException` | if the factory to create embedded content is not provided. |

### setAllowedAuthenticators

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

```
fun setAllowedAuthenticators(authenticators: Int): EmbeddedBiometricPrompt.Builder
```

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

| Parameters ||
|---|---|
| `authenticators` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): 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/kotlin/android/hardware/biometrics/BiometricManager.Authenticators#BIOMETRIC_STRONG:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager.Authenticators#BIOMETRIC_WEAK:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager.Authenticators#DEVICE_CREDENTIAL:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager.Authenticators#IDENTITY_CHECK:kotlin.Int` |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setAuthenticationCallback

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

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

Optional: Sets the authentication callback and executor.

| Parameters ||
|---|---|
| `executor` | [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#): 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/kotlin/java/util/concurrent/Executor.html#`, 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/kotlin/android/content/Context.html#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#` that dispatches to an appropriate thread. |
| `callback` | [EmbeddedBiometricPrompt.AuthenticationCallback](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.AuthenticationCallback): The authentication callback. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setAuthenticationPurpose

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

```
fun setAuthenticationPurpose(purpose: Int): EmbeddedBiometricPrompt.Builder
```

Optional: Sets the authentication purpose for the prompt.

Provides a hint to customize the `https://developer.android.com/reference/kotlin/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/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setAllowedAuthenticators(kotlin.Int)`).

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

| Parameters ||
|---|---|
| `purpose` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The authentication purpose to set. Value is one of the following: - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#AUTHENTICATION_PURPOSE_UNKNOWN:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#AUTHENTICATION_PURPOSE_PAYMENT:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/hardware/biometrics/BiometricManager#AUTHENTICATION_PURPOSE_LOGIN:kotlin.Int` |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setConfirmationRequired

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

```
fun setConfirmationRequired(requireConfirmation: Boolean): EmbeddedBiometricPrompt.Builder
```

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

| Parameters ||
|---|---|
| `requireConfirmation` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): Whether to require user confirmation. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setContentView

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

```
fun setContentView(view: PromptContentView): EmbeddedBiometricPrompt.Builder
```

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/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setDescription(kotlin.CharSequence)` will be overridden by `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setContentView(android.hardware.biometrics.PromptContentView)`. The view provided to `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setContentView(android.hardware.biometrics.PromptContentView)` will be used if both methods are called.

| Parameters ||
|---|---|
| `view` | [PromptContentView](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptContentView): The customized view information to display on the credential page. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setDescription

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

```
fun setDescription(description: CharSequence): EmbeddedBiometricPrompt.Builder
```

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/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setDescription(kotlin.CharSequence)` will be overridden by `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setContentView(android.hardware.biometrics.PromptContentView)`. The view provided to `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setContentView(android.hardware.biometrics.PromptContentView)` will be used if both methods are called.

| Parameters ||
|---|---|
| `description` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html): The description to display on the credential page. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setEmbeddedContentFactory

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

```
fun setEmbeddedContentFactory(contentFactory: EmbeddedBiometricPrompt.EmbeddedContentFactory): EmbeddedBiometricPrompt.Builder
```

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

| Parameters ||
|---|---|
| `contentFactory` | [EmbeddedBiometricPrompt.EmbeddedContentFactory](https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.EmbeddedContentFactory): The factory to use to create the content view. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setExistingAuthSessionId

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

```
fun setExistingAuthSessionId(authSessionId: Long): EmbeddedBiometricPrompt.Builder
```

Optional: Sets the id for an existing authentication session.

| Parameters ||
|---|---|
| `authSessionId` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html): The id for an existing authentication session. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setLogoBitmap

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

```
fun setLogoBitmap(logoBitmap: Bitmap): EmbeddedBiometricPrompt.Builder
```

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/kotlin/android/Manifest.permission.html#SET_BIOMETRIC_DIALOG_ADVANCED:kotlin.String`

| Parameters ||
|---|---|
| `logoBitmap` | [Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#): A bitmap drawable of the logo that will be shown on the credential page. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setLogoDescription

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

```
fun setLogoDescription(logoDescription: String): EmbeddedBiometricPrompt.Builder
```

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/kotlin/android/Manifest.permission.html#SET_BIOMETRIC_DIALOG_ADVANCED:kotlin.String`

| Parameters ||
|---|---|
| `logoDescription` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The logo description text that will be shown on the credential page. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setLogoRes

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

```
fun setLogoRes(logoRes: Int): EmbeddedBiometricPrompt.Builder
```

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/kotlin/android/Manifest.permission.html#SET_BIOMETRIC_DIALOG_ADVANCED:kotlin.String`

| Parameters ||
|---|---|
| `logoRes` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): A drawable resource of the logo that will be shown on the credential page. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setNegativeButton

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

```
fun setNegativeButton(
    text: CharSequence, 
    executor: Executor, 
    listener: DialogInterface.OnClickListener
): EmbeddedBiometricPrompt.Builder
```

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/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#addFallbackOption(kotlin.CharSequence,%20kotlin.Int,%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/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setAllowedAuthenticators(kotlin.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/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#setAllowedAuthenticators(kotlin.Int)`. To use credential authentication and provide custom behavior, use `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#addFallbackOption(kotlin.CharSequence,%20kotlin.Int,%20java.util.concurrent.Executor,%20android.content.DialogInterface.OnClickListener)`

| Parameters ||
|---|---|
| `text` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html): Text to be shown on the negative button for the prompt. This value cannot be `null`. |
| `executor` | [Executor](https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#): 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/kotlin/java/util/concurrent/Executor.html#`, 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/kotlin/android/content/Context.html#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/kotlin/java/util/concurrent/Executor.html#` that dispatches to an appropriate thread. |
| `listener` | [DialogInterface.OnClickListener](https://developer.android.com/reference/kotlin/android/content/DialogInterface.OnClickListener.html#): Listener containing a callback to be run when the button is pressed. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setNextTranslationOffset

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

```
fun setNextTranslationOffset(nextTranslationOffset: Int): EmbeddedBiometricPrompt.Builder
```

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.

| Parameters ||
|---|---|
| `nextTranslationOffset` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The ending target translation offset in pixels (px). |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setPreviousTranslationOffset

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

```
fun setPreviousTranslationOffset(previousTranslationOffset: Int): EmbeddedBiometricPrompt.Builder
```

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.

| Parameters ||
|---|---|
| `previousTranslationOffset` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The starting translation offset in pixels (px). |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setSubtitle

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

```
fun setSubtitle(subtitle: CharSequence): EmbeddedBiometricPrompt.Builder
```

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

| Parameters ||
|---|---|
| `subtitle` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html): The subtitle to display on the credential page. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |

### setTitle

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

```
fun setTitle(title: CharSequence): EmbeddedBiometricPrompt.Builder
```

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

| Parameters ||
|---|---|
| `title` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html): The title to display on the credential page. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/biometrics/EmbeddedBiometricPrompt.Builder#` | This builder. This value cannot be `null`. |