Stay organized with collections
Save and categorize content based on your preferences.
OnClearApplicationUserDataListener
interface OnClearApplicationUserDataListener
Callback used in clearApplicationUserData
to indicate that the clearing of an application's user data is done.
Summary
Public methods |
abstract Unit |
Method invoked when clearing the application user data has completed.
|
Public methods
onApplicationUserDataCleared
abstract fun onApplicationUserDataCleared(
packageName: String!,
succeeded: Boolean
): Unit
Method invoked when clearing the application user data has completed.
Parameters |
packageName |
String!: The name of the package which had its user data cleared. |
succeeded |
Boolean: Whether the clearing succeeded. Clearing fails for device administrator apps and protected system packages. |
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,["# DevicePolicyManager.OnClearApplicationUserDataListener\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnClearApplicationUserDataListener\n==================================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/admin/DevicePolicyManager.OnClearApplicationUserDataListener \"View this page in Java\") \n\n```\ninterface OnClearApplicationUserDataListener\n```\n\n|-------------------------------------------------------------------------------|\n| [android.app.admin.DevicePolicyManager.OnClearApplicationUserDataListener](#) |\n\nCallback used in [clearApplicationUserData](/reference/kotlin/android/app/admin/DevicePolicyManager#clearApplicationUserData(android.content.ComponentName,%20kotlin.String,%20java.util.concurrent.Executor,%20android.app.admin.DevicePolicyManager.OnClearApplicationUserDataListener)) to indicate that the clearing of an application's user data is done.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onApplicationUserDataCleared](#onApplicationUserDataCleared(kotlin.String,%20kotlin.Boolean))`(`packageName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `succeeded:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Method invoked when clearing the application user data has completed. |\n\nPublic methods\n--------------\n\n### onApplicationUserDataCleared\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onApplicationUserDataCleared(\n packageName: String!, \n succeeded: Boolean\n): Unit\n```\n\nMethod invoked when clearing the application user data has completed.\n\n| Parameters ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: The name of the package which had its user data cleared. |\n| `succeeded` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): Whether the clearing succeeded. Clearing fails for device administrator apps and protected system packages. |"]]