# BiometricManager.Strings

Artifact: [androidx.biometric:biometric](https://developer.android.com/jetpack/androidx/releases/biometric) [View Source](https://cs.android.com/search?q=file:androidx/biometric/BiometricManager.java+class:androidx.biometric.BiometricManager.Strings) Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

*** ** * ** ***


```
public class BiometricManager.Strings
```

<br />

*** ** * ** ***

Provides localized strings for an application that uses `https://developer.android.com/reference/androidx/biometric/BiometricPrompt` to authenticate the user.

## Summary

| ### Public methods |
|---|---|
| `@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/annotation/RequiresPermission(value = https://developer.android.com/reference/android/Manifest.permission.html#USE_BIOMETRIC) https://developer.android.com/reference/androidx/biometric/BiometricManager.Strings#getButtonLabel()()` Provides a localized string that can be used as the label for a button that invokes `https://developer.android.com/reference/androidx/biometric/BiometricPrompt`. |
| `@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/annotation/RequiresPermission(value = https://developer.android.com/reference/android/Manifest.permission.html#USE_BIOMETRIC) https://developer.android.com/reference/androidx/biometric/BiometricManager.Strings#getPromptMessage()()` Provides a localized string that can be shown while the user is authenticating with `https://developer.android.com/reference/androidx/biometric/BiometricPrompt`. |
| `@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/annotation/RequiresPermission(value = https://developer.android.com/reference/android/Manifest.permission.html#USE_BIOMETRIC) https://developer.android.com/reference/androidx/biometric/BiometricManager.Strings#getSettingName()()` Provides a localized string that can be shown as the title for an app setting that allows authentication with `https://developer.android.com/reference/androidx/biometric/BiometricPrompt`. |

## Public methods

### getButtonLabel

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

```
@RequiresPermission(value = Manifest.permission.USE_BIOMETRIC)
public @Nullable CharSequence getButtonLabel()
```

Provides a localized string that can be used as the label for a button that invokes `https://developer.android.com/reference/androidx/biometric/BiometricPrompt`.

This method will use the provided authenticator requirements to more precisely specify the authentication type that will be used. For example, if **Class 3** biometric authentication is requested on a device with a **Class 3** fingerprint sensor and a **Class 2** face sensor, the returned string will indicate that fingerprint authentication will be used.

The method will also specify which authentication method(s) will be used in practice when multiple authenticators meet the given requirements. For example, if biometric authentication is requested on a device with both face and fingerprint sensors but the user has selected face as their preferred method, the returned string will indicate that face authentication will be used.

This method may return `null` if none of the requested authenticator types are available, but do *not* reply upon this API for checking the status of authenticators. Instead, use `https://developer.android.com/reference/androidx/biometric/BiometricManager#canAuthenticate(int)`.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | The label for a button that invokes `https://developer.android.com/reference/androidx/biometric/BiometricPrompt` for authentication. |

### getPromptMessage

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

```
@RequiresPermission(value = Manifest.permission.USE_BIOMETRIC)
public @Nullable CharSequence getPromptMessage()
```

Provides a localized string that can be shown while the user is authenticating with `https://developer.android.com/reference/androidx/biometric/BiometricPrompt`.

This method will use the provided authenticator requirements to more precisely specify the authentication type that will be used. For example, if **Class 3** biometric authentication is requested on a device with a **Class 3** fingerprint sensor and a **Class 2** face sensor, the returned string will indicate that fingerprint authentication will be used.

The method will also specify which authentication method(s) will be used in practice when multiple authenticators meet the given requirements. For example, if biometric authentication is requested on a device with both face and fingerprint sensors but the user has selected face as their preferred method, the returned string will indicate that face authentication will be used.

This method may return `null` if none of the requested authenticator types are available, but do *not* reply upon this method for checking the status of authenticators. Instead, use `https://developer.android.com/reference/androidx/biometric/BiometricManager#canAuthenticate(int)`.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | A message to be shown on `https://developer.android.com/reference/androidx/biometric/BiometricPrompt` during authentication. |

### getSettingName

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

```
@RequiresPermission(value = Manifest.permission.USE_BIOMETRIC)
public @Nullable CharSequence getSettingName()
```

Provides a localized string that can be shown as the title for an app setting that allows authentication with `https://developer.android.com/reference/androidx/biometric/BiometricPrompt`.

This method will use the provided authenticator requirements to more precisely specify the authentication type that will be used. For example, if **Class 3** biometric authentication is requested on a device with a **Class 3** fingerprint sensor and a **Class 2** face sensor, the returned string will indicate that fingerprint authentication will be used.

This method will *not* try to specify which authentication method(s) will be used in practice when multiple authenticators meet the given requirements. For example, if biometric authentication is requested on a device with both face and fingerprint sensors, the returned string will indicate that either face or fingerprint authentication may be used, regardless of whether the user has enrolled or selected either as their preferred method.

This method may return `null` if none of the requested authenticator types are supported by the system, but do *not* reply upon this method for checking the status of authenticators. Instead, use `https://developer.android.com/reference/androidx/biometric/BiometricManager#canAuthenticate(int)` or `https://developer.android.com/reference/android/content/pm/PackageManager.html#hasSystemFeature(java.lang.String)`.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | The name for a setting that allows authentication with `https://developer.android.com/reference/androidx/biometric/BiometricPrompt`. |