Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#nestedclasses) \| [Constants](https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#constants) \| [Methods](https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#inhmethods)

# FingerprintGestureController

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/accessibilityservice/FingerprintGestureController "View this page in Kotlin") \|Java


`
public

final

class
FingerprintGestureController
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.accessibilityservice.FingerprintGestureController |

<br />

*** ** * ** ***

An `https://developer.android.com/reference/android/accessibilityservice/AccessibilityService` can capture gestures performed on a device's fingerprint
sensor, as long as the device has a sensor capable of detecting gestures.


This capability must be declared by the service as
`https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo#CAPABILITY_CAN_REQUEST_FINGERPRINT_GESTURES`. It also requires
the permission `https://developer.android.com/reference/android/Manifest.permission#USE_FINGERPRINT`.


Because capturing fingerprint gestures may have side effects, services with the capability only
capture gestures when `https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo#FLAG_REQUEST_FINGERPRINT_GESTURES` is set.


**Note:** The fingerprint sensor is used for authentication in critical use cases,
so services must carefully design their user's experience when performing gestures on the sensor.
When the sensor is in use by an app, for example, when authenticating or enrolling a user,
the sensor will not detect gestures. Services need to ensure that users understand when the
sensor is in-use for authentication to prevent users from authenticating unintentionally when
trying to interact with the service. They can use
`https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController.FingerprintGestureCallback#onGestureDetectionAvailabilityChanged(boolean)` to learn when
gesture detection becomes unavailable.


Multiple accessibility services may listen for fingerprint gestures simultaneously, so services
should provide a way for the user to disable the use of this feature so multiple services don't
conflict with each other.

<br />

**See also:**

- `https://developer.android.com/`

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController.FingerprintGestureCallback` Class that is called back when fingerprint gestures are being used for accessibility. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#FINGERPRINT_GESTURE_SWIPE_DOWN` Identifier for a swipe down on the fingerprint sensor |
| `int` | `https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#FINGERPRINT_GESTURE_SWIPE_LEFT` Identifier for a swipe left on the fingerprint sensor |
| `int` | `https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#FINGERPRINT_GESTURE_SWIPE_RIGHT` Identifier for a swipe right on the fingerprint sensor |
| `int` | `https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#FINGERPRINT_GESTURE_SWIPE_UP` Identifier for a swipe up on the fingerprint sensor |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#isGestureDetectionAvailable()() ` Gets if the fingerprint sensor's gesture detection is available. |
| ` void` | ` https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#registerFingerprintGestureCallback(android.accessibilityservice.FingerprintGestureController.FingerprintGestureCallback,%20android.os.Handler)(https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController.FingerprintGestureCallback callback, https://developer.android.com/reference/android/os/Handler handler) ` Register a callback to be informed of fingerprint sensor gesture events. |
| ` void` | ` https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#unregisterFingerprintGestureCallback(android.accessibilityservice.FingerprintGestureController.FingerprintGestureCallback)(https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController.FingerprintGestureCallback callback) ` Unregister a listener added with `https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#registerFingerprintGestureCallback(android.accessibilityservice.FingerprintGestureController.FingerprintGestureCallback,%20android.os.Handler)`. |

| ### 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*. | ||

## Constants

### FINGERPRINT_GESTURE_SWIPE_DOWN

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

```
public static final int FINGERPRINT_GESTURE_SWIPE_DOWN
```

Identifier for a swipe down on the fingerprint sensor

<br />

Constant Value:

8
(0x00000008)


### FINGERPRINT_GESTURE_SWIPE_LEFT

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

```
public static final int FINGERPRINT_GESTURE_SWIPE_LEFT
```

Identifier for a swipe left on the fingerprint sensor

<br />

Constant Value:

2
(0x00000002)


### FINGERPRINT_GESTURE_SWIPE_RIGHT

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

```
public static final int FINGERPRINT_GESTURE_SWIPE_RIGHT
```

Identifier for a swipe right on the fingerprint sensor

<br />

Constant Value:

1
(0x00000001)


### FINGERPRINT_GESTURE_SWIPE_UP

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

```
public static final int FINGERPRINT_GESTURE_SWIPE_UP
```

Identifier for a swipe up on the fingerprint sensor

<br />

Constant Value:

4
(0x00000004)


## Public methods

### isGestureDetectionAvailable

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

```
public boolean isGestureDetectionAvailable ()
```

Gets if the fingerprint sensor's gesture detection is available.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the sensor's gesture detection is available. `false` if it is not currently detecting gestures (for example, if it is enrolling a finger). <br /> |

### registerFingerprintGestureCallback

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

```
public void registerFingerprintGestureCallback (FingerprintGestureController.FingerprintGestureCallback callback, 
                Handler handler)
```

Register a callback to be informed of fingerprint sensor gesture events.

<br />

| Parameters ||
|---|---|
| `callback` | `FingerprintGestureController.FingerprintGestureCallback`: The listener to be added. This value cannot be `null`. <br /> |
| `handler` | `Handler`: The handler to use for the callback. If `null`, callbacks will happen on the service's main thread. <br /> |

### unregisterFingerprintGestureCallback

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

```
public void unregisterFingerprintGestureCallback (FingerprintGestureController.FingerprintGestureCallback callback)
```

Unregister a listener added with `https://developer.android.com/reference/android/accessibilityservice/FingerprintGestureController#registerFingerprintGestureCallback(android.accessibilityservice.FingerprintGestureController.FingerprintGestureCallback,%20android.os.Handler)`.

<br />

| Parameters ||
|---|---|
| `callback` | `FingerprintGestureController.FingerprintGestureCallback`: The callback to remove. Removing a callback that was never added has no effect. <br /> |