Stay organized with collections
Save and categorize content based on your preferences.
AdvancedProtectionManager.Callback
public
static
interface
AdvancedProtectionManager.Callback
| android.security.advancedprotection.AdvancedProtectionManager.Callback
|
A callback class for monitoring changes to Advanced Protection state
To register a callback, implement this interface, and register it with
AdvancedProtectionManager.registerAdvancedProtectionCallback(Executor, Callback).
Methods are called when the state changes, as well as once on initial registration.
Summary
Public methods
onAdvancedProtectionChanged
public abstract void onAdvancedProtectionChanged (boolean enabled)
Called when advanced protection state changes
| Parameters |
enabled |
boolean: the new state |
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-03-13 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-03-13 UTC."],[],[],null,["# AdvancedProtectionManager.Callback\n\nAdded in [API level 36](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nAdvancedProtectionManager.Callback\n==================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/security/advancedprotection/AdvancedProtectionManager.Callback \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nAdvancedProtectionManager.Callback\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------------------------------|\n| android.security.advancedprotection.AdvancedProtectionManager.Callback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA callback class for monitoring changes to Advanced Protection state\n\nTo register a callback, implement this interface, and register it with\n[AdvancedProtectionManager.registerAdvancedProtectionCallback(Executor, Callback)](/reference/android/security/advancedprotection/AdvancedProtectionManager#registerAdvancedProtectionCallback(java.util.concurrent.Executor,%20android.security.advancedprotection.AdvancedProtectionManager.Callback)).\nMethods are called when the state changes, as well as once on initial registration.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onAdvancedProtectionChanged](/reference/android/security/advancedprotection/AdvancedProtectionManager.Callback#onAdvancedProtectionChanged(boolean))`(boolean enabled) ` Called when advanced protection state changes |\n\nPublic methods\n--------------\n\n### onAdvancedProtectionChanged\n\nAdded in [API level 36](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onAdvancedProtectionChanged (boolean enabled)\n```\n\nCalled when advanced protection state changes\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|---------------------------------|\n| `enabled` | `boolean`: the new state \u003cbr /\u003e |"]]