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

# BiometricManager.Strings

*** ** * ** ***

` public static class BiometricManager.Strings `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

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

<br />

*** ** * ** ***

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

## Summary

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Strings#getButtonLabel()() ` Provides a localized string that can be used as the label for a button that invokes `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt`. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Strings#getPromptMessage()() ` Provides a localized string that can be shown while the user is authenticating with `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt`. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Strings#getSettingName()() ` Provides a localized string that can be shown as the title for an app setting that enables authentication with `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt`. |

### 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 methods

### getButtonLabel

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

```
public CharSequence getButtonLabel ()
```

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

When possible, this method should use the given 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 should indicate that fingerprint authentication will be used.

This method should also 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 but the user has selected face as their preferred method, the returned string should indicate that face authentication will be used.

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

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The label for a button that invokes `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt` for authentication. <br /> |

### getPromptMessage

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

```
public CharSequence getPromptMessage ()
```

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

When possible, this method should use the given 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 should indicate that fingerprint authentication will be used.

This method should also 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 but the user has selected face as their preferred method, the returned string should indicate that face authentication will be used.

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

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The label for a button that invokes `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt` for authentication. <br /> |

### getSettingName

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

```
public CharSequence getSettingName ()
```

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

When possible, this method should use the given 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 should indicate that fingerprint authentication will be used.

This method should *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 should 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 this should *not* be relied upon for checking the status of authenticators. Instead, use `https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#canAuthenticate(int)` or `https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)`.   

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The label for a button that invokes `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt` for authentication. <br /> |