Stay organized with collections
Save and categorize content based on your preferences.
DeviceLockedStateListener
@FunctionalInterface interface DeviceLockedStateListener
Listener for device locked state changes.
Summary
Public methods |
abstract Unit |
Callback function that executes when the device locked state changes.
|
Public methods
onDeviceLockedStateChanged
abstract fun onDeviceLockedStateChanged(isDeviceLocked: Boolean): Unit
Callback function that executes when the device locked state changes.
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-08-20 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-08-20 UTC."],[],[],null,["# KeyguardManager.DeviceLockedStateListener\n\nAdded in [API level Baklava](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDeviceLockedStateListener\n=========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/KeyguardManager.DeviceLockedStateListener \"View this page in Java\") \n\n```\n@FunctionalInterface interface DeviceLockedStateListener\n```\n\n|------------------------------------------------------------|\n| [android.app.KeyguardManager.DeviceLockedStateListener](#) |\n\nListener for device locked state changes.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDeviceLockedStateChanged](#onDeviceLockedStateChanged(kotlin.Boolean))`(`isDeviceLocked:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Callback function that executes when the device locked state changes. |\n\nPublic methods\n--------------\n\n### onDeviceLockedStateChanged\n\nAdded in [API level Baklava](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onDeviceLockedStateChanged(isDeviceLocked: Boolean): Unit\n```\n\nCallback function that executes when the device locked state changes."]]