public class

BiometricManager.Strings

extends java.lang.Object

 java.lang.Object

↳androidx.biometric.BiometricManager.Strings

Overview

Provides localized strings for an application that uses BiometricPrompt to authenticate the user.

Summary

Methods
public java.lang.CharSequencegetButtonLabel()

Provides a localized string that can be used as the label for a button that invokes BiometricPrompt.

public java.lang.CharSequencegetPromptMessage()

Provides a localized string that can be shown while the user is authenticating with BiometricPrompt.

public java.lang.CharSequencegetSettingName()

Provides a localized string that can be shown as the title for an app setting that allows authentication with BiometricPrompt.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public java.lang.CharSequence getButtonLabel()

Provides a localized string that can be used as the label for a button that invokes 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 BiometricManager.canAuthenticate(int).

Returns:

The label for a button that invokes BiometricPrompt for authentication.

public java.lang.CharSequence getPromptMessage()

Provides a localized string that can be shown while the user is authenticating with 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 BiometricManager.canAuthenticate(int).

Returns:

A message to be shown on BiometricPrompt during authentication.

public java.lang.CharSequence getSettingName()

Provides a localized string that can be shown as the title for an app setting that allows authentication with 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 BiometricManager.canAuthenticate(int) or android.content.pm.PackageManager.

Returns:

The name for a setting that allows authentication with BiometricPrompt.