# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Nested Classes | Constants | Methods | Inherited Methods

# BiometricManager

`public class BiometricManager`
`extends Object` ``

java.lang.Object
↳ | android.hardware.biometrics.BiometricManager

A class that contains biometric utilities. For authentication, see `BiometricPrompt`.

## Summary

### Nested classes
`interface` | `BiometricManager.Authenticators` Types of authenticators, defined at a level of granularity supported by `BiometricManager` and `BiometricPrompt`.
`class` | `BiometricManager.Strings` Provides localized strings for an application that uses `BiometricPrompt` to authenticate the user.

### Constants
`int` | `BIOMETRIC_ERROR_HW_UNAVAILABLE` The hardware is unavailable.
`int` | `BIOMETRIC_ERROR_NONE_ENROLLED` The user does not have any biometrics enrolled.
`int` | `BIOMETRIC_ERROR_NO_HARDWARE` There is no biometric hardware.
`int` | `BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED` A security vulnerability has been discovered and the sensor is unavailable until a security update has addressed this issue.
`int` | `BIOMETRIC_SUCCESS` No error detected.

### Public methods
`int` | `canAuthenticate()` This method is deprecated. See `canAuthenticate(int)`.
`int` | `canAuthenticate(int authenticators)` Determine if any of the provided authenticators can be used.
`BiometricManager.Strings` | `getStrings(int authenticators)` Produces an instance of the `Strings` class, which provides localized strings for an application, given a set of allowed authenticator types.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### BIOMETRIC_ERROR_HW_UNAVAILABLE

    public static final int BIOMETRIC_ERROR_HW_UNAVAILABLE

The hardware is unavailable. Try again later.

Constant Value: 1 (0x00000001)

### BIOMETRIC_ERROR_NONE_ENROLLED

    public static final int BIOMETRIC_ERROR_NONE_ENROLLED

The user does not have any biometrics enrolled.

Constant Value: 11 (0x0000000b)

### BIOMETRIC_ERROR_NO_HARDWARE

    public static final int BIOMETRIC_ERROR_NO_HARDWARE

There is no biometric hardware.

Constant Value: 12 (0x0000000c)

### BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED

    public static final int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED

A security vulnerability has been discovered and the sensor is unavailable until a security update has addressed this issue. This error can be received if for example, authentication was requested with `Authenticators#BIOMETRIC_STRONG`, but the sensor's strength can currently only meet `Authenticators#BIOMETRIC_WEAK`.

Constant Value: 15 (0x0000000f)

### BIOMETRIC_SUCCESS

    public static final int BIOMETRIC_SUCCESS

No error detected.

Constant Value: 0 (0x00000000)

## Public methods

### canAuthenticate

    public int canAuthenticate ()

This method is deprecated.
See `canAuthenticate(int)`.

Determine if biometrics can be used. In other words, determine if `BiometricPrompt` can be expected to be shown (hardware available, templates enrolled, user-enabled). This is the equivalent of `canAuthenticate(int)` with `Authenticators#BIOMETRIC_WEAK`
Requires `Manifest.permission.USE_BIOMETRIC`

Returns
`int` | `BIOMETRIC_ERROR_NONE_ENROLLED` if the user does not have any strong biometrics enrolled, or `BIOMETRIC_ERROR_HW_UNAVAILABLE` if none are currently supported/enabled. Returns `BIOMETRIC_SUCCESS` if a strong biometric can currently be used (enrolled and available). Value is `BIOMETRIC_SUCCESS`, `BIOMETRIC_ERROR_HW_UNAVAILABLE`, `BIOMETRIC_ERROR_NONE_ENROLLED`, `BIOMETRIC_ERROR_NO_HARDWARE`, or `BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED`

### canAuthenticate

    public int canAuthenticate (int authenticators)

Determine if any of the provided authenticators can be used. In other words, determine if `BiometricPrompt` can be expected to be shown (hardware available, templates enrolled, user-enabled). For biometric authenticators, determine if the device can currently authenticate with at least the requested strength. For example, invoking this API with `Authenticators#BIOMETRIC_WEAK` on a device that currently only has `Authenticators#BIOMETRIC_STRONG` enrolled will return `BIOMETRIC_SUCCESS`. Invoking this API with `Authenticators#DEVICE_CREDENTIAL` can be used to determine if the user has a PIN/Pattern/Password set up.
Requires `Manifest.permission.USE_BIOMETRIC`

Parameters
`authenticators` | `int`: bit field consisting of constants defined in `Authenticators`. If multiple authenticators are queried, a logical OR will be applied. For example, if `Authenticators#DEVICE_CREDENTIAL` | `Authenticators#BIOMETRIC_STRONG` is queried and only `Authenticators#DEVICE_CREDENTIAL` is set up, this API will return `BIOMETRIC_SUCCESS` Value is either `0` or a combination of `BiometricManager.Authenticators.BIOMETRIC_STRONG`, `BiometricManager.Authenticators.BIOMETRIC_WEAK`, android.hardware.biometrics.BiometricManager.Authenticators.BIOMETRIC_CONVENIENCE, and `BiometricManager.Authenticators.DEVICE_CREDENTIAL`

Returns
`int` | `BIOMETRIC_ERROR_NONE_ENROLLED` if the user does not have any of the requested authenticators enrolled, or `BIOMETRIC_ERROR_HW_UNAVAILABLE` if none are currently supported/enabled. Returns `BIOMETRIC_SUCCESS` if one of the requested authenticators can currently be used (enrolled and available). Value is `BIOMETRIC_SUCCESS`, `BIOMETRIC_ERROR_HW_UNAVAILABLE`, `BIOMETRIC_ERROR_NONE_ENROLLED`, `BIOMETRIC_ERROR_NO_HARDWARE`, or `BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED`

### getStrings

    public BiometricManager.Strings getStrings (int authenticators)

Produces an instance of the `Strings` class, which provides localized strings for an application, given a set of allowed authenticator types.
Requires `Manifest.permission.USE_BIOMETRIC`

Parameters
`authenticators` | `int`: A bit field representing the types of `Authenticators` that may be used for authentication. Value is either `0` or a combination of `BiometricManager.Authenticators.BIOMETRIC_STRONG`, `BiometricManager.Authenticators.BIOMETRIC_WEAK`, android.hardware.biometrics.BiometricManager.Authenticators.BIOMETRIC_CONVENIENCE, and `BiometricManager.Authenticators.DEVICE_CREDENTIAL`

Returns
`BiometricManager.Strings` | A `Strings` collection for the given allowed authenticator types. This value cannot be `null`.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*