Stay organized with collections
Save and categorize content based on your preferences.
KeyguardDismissCallback
abstract class KeyguardDismissCallback
Callback passed to KeyguardManager.requestDismissKeyguard(Activity, KeyguardDismissCallback)
to notify caller of result.
Summary
Public methods |
open Unit |
Called when dismissing Keyguard has been cancelled, i.
|
open Unit |
Called when dismissing Keyguard is currently not feasible, i.
|
open Unit |
Called when dismissing Keyguard has succeeded and the device is now unlocked.
|
Public constructors
KeyguardDismissCallback
KeyguardDismissCallback()
Public methods
onDismissCancelled
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
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
open fun onDismissSucceeded(): Unit
Called when dismissing Keyguard has succeeded and the device is now unlocked.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# KeyguardManager.KeyguardDismissCallback\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nKeyguardDismissCallback\n=======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/KeyguardManager.KeyguardDismissCallback \"View this page in Java\") \n\n```\nabstract class KeyguardDismissCallback\n```\n\n|---|----------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.app.KeyguardManager.KeyguardDismissCallback](#) |\n\nCallback passed to [KeyguardManager.requestDismissKeyguard(Activity, KeyguardDismissCallback)](/reference/kotlin/android/app/KeyguardManager#requestDismissKeyguard(android.app.Activity,%20android.app.KeyguardManager.KeyguardDismissCallback)) to notify caller of result.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------|---|\n| [KeyguardDismissCallback](#KeyguardDismissCallback())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDismissCancelled](#onDismissCancelled())`()` Called when dismissing Keyguard has been cancelled, i. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDismissError](#onDismissError())`()` Called when dismissing Keyguard is currently not feasible, i. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDismissSucceeded](#onDismissSucceeded())`()` Called when dismissing Keyguard has succeeded and the device is now unlocked. |\n\nPublic constructors\n-------------------\n\n### KeyguardDismissCallback\n\n```\nKeyguardDismissCallback()\n```\n\nPublic methods\n--------------\n\n### onDismissCancelled\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onDismissCancelled(): Unit\n```\n\nCalled when dismissing Keyguard has been cancelled, i.e. when the user cancelled the operation or the bouncer was hidden for some other reason. \n\n### onDismissError\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onDismissError(): Unit\n```\n\nCalled 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. \n\n### onDismissSucceeded\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onDismissSucceeded(): Unit\n```\n\nCalled when dismissing Keyguard has succeeded and the device is now unlocked."]]