# KeyguardManager.KeyguardDismissCallback

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

# KeyguardDismissCallback

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/app/KeyguardManager.KeyguardDismissCallback "View this page in Java")  

```
abstract class KeyguardDismissCallback
```

|---|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                             ||
| ↳ | [android.app.KeyguardManager.KeyguardDismissCallback](https://developer.android.com/reference/kotlin/android/app/KeyguardManager.KeyguardDismissCallback#) |

Callback passed to[KeyguardManager.requestDismissKeyguard(Activity, KeyguardDismissCallback)](https://developer.android.com/reference/kotlin/android/app/KeyguardManager#requestDismissKeyguard(android.app.Activity,%20android.app.KeyguardManager.KeyguardDismissCallback))to notify caller of result.

## Summary

|                                                                          Public constructors                                                                          ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [KeyguardDismissCallback](https://developer.android.com/reference/kotlin/android/app/KeyguardManager.KeyguardDismissCallback#KeyguardDismissCallback())`()` <br /> |

|                                                                                                                                                  Public methods                                                                                                                                                   ||
|----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDismissCancelled](https://developer.android.com/reference/kotlin/android/app/KeyguardManager.KeyguardDismissCallback#onDismissCancelled())`()` Called when dismissing Keyguard has been cancelled, i.                        |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDismissError](https://developer.android.com/reference/kotlin/android/app/KeyguardManager.KeyguardDismissCallback#onDismissError())`()` Called when dismissing Keyguard is currently not feasible, i.                         |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDismissSucceeded](https://developer.android.com/reference/kotlin/android/app/KeyguardManager.KeyguardDismissCallback#onDismissSucceeded())`()` Called when dismissing Keyguard has succeeded and the device is now unlocked. |

## Public constructors

### KeyguardDismissCallback

```
KeyguardDismissCallback()
```

## Public methods

### onDismissCancelled

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

```
open fun onDismissCancelled(): Unit
```

Called when dismissing Keyguard has been cancelled, i.e. when the user cancelled the operation or the bouncer was hidden for some other reason.  

### onDismissError

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

```
open fun onDismissError(): Unit
```

Called when dismissing Keyguard is currently not feasible, i.e. when Keyguard is not available, not showing or when the activity requesting the Keyguard dismissal isn't showing or isn't showing behind Keyguard.  

### onDismissSucceeded

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

```
open fun onDismissSucceeded(): Unit
```

Called when dismissing Keyguard has succeeded and the device is now unlocked.