# BiometricPrompt.PromptInfo

Artifact: [androidx.biometric:biometric](https://developer.android.com/jetpack/androidx/releases/biometric) [View Source](https://cs.android.com/search?q=file:androidx/biometric/BiometricPrompt.java+class:androidx.biometric.BiometricPrompt.PromptInfo) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/biometric#1.0.0)

*** ** * ** ***


```
public class BiometricPrompt.PromptInfo
```

<br />

*** ** * ** ***

A set of configurable options for how the `https://developer.android.com/reference/androidx/biometric/BiometricPrompt` should appear and behave.

## Summary

| ### Nested types |
|---|
| `public class https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder` A builder used to set individual options for the `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo` class. |

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#getAllowedAuthenticators()()` Gets the type(s) of authenticators that may be invoked by the prompt. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/biometric/PromptContentView` | `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#getContentView()()` Gets the content view for the prompt, as set by `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setContentView(androidx.biometric.PromptContentView)`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#getDescription()()` Gets the description for the prompt. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/Bitmap.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED") https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#getLogoBitmap()()` Gets the logo bitmap for the prompt, as set by `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setLogoBitmap(android.graphics.Bitmap)`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED") https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#getLogoDescription()()` Gets the logo description for the prompt, as set by `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setLogoDescription(java.lang.String)`. |
| `@https://developer.android.com/reference/androidx/annotation/DrawableRes int` | `@https://developer.android.com/reference/androidx/annotation/RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED") https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#getLogoRes()()` Gets the drawable resource of the logo for the prompt, as set by `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setLogoRes(int)`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#getNegativeButtonText()()` Gets the text for the negative button on the prompt. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#getSubtitle()()` Gets the subtitle for the prompt. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#getTitle()()` Gets the title for the prompt. |
| `boolean` | `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#isConfirmationRequired()()` Checks if the confirmation required option is enabled for the prompt. |
| `boolean` | `[isDeviceCredentialAllowed](https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#isDeviceCredentialAllowed())()` **This method is deprecated.** Will be removed with `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setDeviceCredentialAllowed(boolean)`. <br /> |

## Public methods

### getAllowedAuthenticators

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/biometric#1.1.0)

```
public int getAllowedAuthenticators()
```

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

Value is either `0` or a combination of the following:

- `Authenticators.BIOMETRIC_STRONG`
- `Authenticators.BIOMETRIC_WEAK`
- `Authenticators.DEVICE_CREDENTIAL`
- `Authenticators.IDENTITY_CHECK`

<br />

| Returns |
|---|---|
| `int` | A bit field representing all valid authenticator types that may be invoked by the prompt, or 0 if not set. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setAllowedAuthenticators(int)` |   |

### getContentView

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
public @Nullable PromptContentView getContentView()
```

Gets the content view for the prompt, as set by `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setContentView(androidx.biometric.PromptContentView)`.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/biometric/PromptContentView` | The content view for the prompt, or null if the prompt has no content view. |

### getDescription

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/biometric#1.0.0)

```
public @Nullable CharSequence getDescription()
```

Gets the description for the prompt.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | The description to be displayed on the prompt. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setDescription(java.lang.CharSequence)` |   |

### getLogoBitmap

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public @Nullable Bitmap getLogoBitmap()
```

Gets the logo bitmap for the prompt, as set by `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setLogoBitmap(android.graphics.Bitmap)`. Currently for system applications use only.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/Bitmap.html` | The logo bitmap of the prompt, or null if the prompt has no logo bitmap set. |

### getLogoDescription

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public @Nullable String getLogoDescription()
```

Gets the logo description for the prompt, as set by `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setLogoDescription(java.lang.String)`. Currently for system applications use only.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | The logo description of the prompt, or null if the prompt has no logo description set. |

### getLogoRes

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public @DrawableRes int getLogoRes()
```

Gets the drawable resource of the logo for the prompt, as set by `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setLogoRes(int)`. Currently for system applications use only.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/DrawableRes int` | The drawable resource of the logo, or -1 if the prompt has no logo resource set. |

### getNegativeButtonText

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/biometric#1.0.0)

```
public @NonNull CharSequence getNegativeButtonText()
```

Gets the text for the negative button on the prompt.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html` | The label to be used for the negative button on the prompt, or an empty string if not set. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setNegativeButtonText(java.lang.CharSequence)` |   |

### getSubtitle

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/biometric#1.0.0)

```
public @Nullable CharSequence getSubtitle()
```

Gets the subtitle for the prompt.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | The subtitle to be displayed on the prompt. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setSubtitle(java.lang.CharSequence)` |   |

### getTitle

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/biometric#1.0.0)

```
public @NonNull CharSequence getTitle()
```

Gets the title for the prompt.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html` | The title to be displayed on the prompt. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setTitle(java.lang.CharSequence)` |   |

### isConfirmationRequired

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/biometric#1.0.0)

```
public boolean isConfirmationRequired()
```

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

| Returns |
|---|---|
| `boolean` | Whether this option is enabled. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setConfirmationRequired(boolean)` |   |

### isDeviceCredentialAllowed

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/biometric#1.0.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/biometric#1.1.0)

```
public boolean [isDeviceCredentialAllowed](https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo#isDeviceCredentialAllowed())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Will be removed with `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setDeviceCredentialAllowed(boolean)`.

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

| Returns |
|---|---|
| `boolean` | Whether this option is enabled. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setDeviceCredentialAllowed(boolean)` |   |