Stay organized with collections
Save and categorize content based on your preferences.
abstract class AccessibilityButtonCallback
Callback for interaction with and changes to state of the accessibility button within the system's navigation area.
Summary
Public methods |
open Unit |
Called when the availability of the accessibility button in the system's navigation area has changed.
|
open Unit |
Called when the accessibility button in the system's navigation area is clicked.
|
Public constructors
AccessibilityButtonCallback()
Public methods
onAvailabilityChanged
open fun onAvailabilityChanged(
controller: AccessibilityButtonController!,
available: Boolean
): Unit
Called when the availability of the accessibility button in the system's navigation area has changed. The accessibility button may become unavailable because the device shopped showing the button, the button was assigned to another service, or for other reasons.
Parameters |
controller |
AccessibilityButtonController!: the controller used to register for this callback |
available |
Boolean: true if the accessibility button is available to this service, false otherwise |
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,["# AccessibilityButtonController.AccessibilityButtonCallback\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAccessibilityButtonCallback\n===========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/accessibilityservice/AccessibilityButtonController.AccessibilityButtonCallback \"View this page in Java\") \n\n```\nabstract class AccessibilityButtonCallback\n```\n\n|---|---------------------------------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback](#) |\n\nCallback for interaction with and changes to state of the accessibility button within the system's navigation area.\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------------------------|---|\n| [AccessibilityButtonCallback](#AccessibilityButtonCallback())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAvailabilityChanged](#onAvailabilityChanged(android.accessibilityservice.AccessibilityButtonController,%20kotlin.Boolean))`(`controller:` `[AccessibilityButtonController](/reference/kotlin/android/accessibilityservice/AccessibilityButtonController)!`, `available:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the availability of the accessibility button in the system's navigation area has changed. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onClicked](#onClicked(android.accessibilityservice.AccessibilityButtonController))`(`controller:` `[AccessibilityButtonController](/reference/kotlin/android/accessibilityservice/AccessibilityButtonController)!`)` Called when the accessibility button in the system's navigation area is clicked. |\n\nPublic constructors\n-------------------\n\n### AccessibilityButtonCallback\n\n```\nAccessibilityButtonCallback()\n```\n\nPublic methods\n--------------\n\n### onAvailabilityChanged\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onAvailabilityChanged(\n controller: AccessibilityButtonController!, \n available: Boolean\n): Unit\n```\n\nCalled when the availability of the accessibility button in the system's navigation area has changed. The accessibility button may become unavailable because the device shopped showing the button, the button was assigned to another service, or for other reasons.\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `controller` | [AccessibilityButtonController](/reference/kotlin/android/accessibilityservice/AccessibilityButtonController)!: the controller used to register for this callback |\n| `available` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): `true` if the accessibility button is available to this service, `false` otherwise |\n\n### onClicked\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onClicked(controller: AccessibilityButtonController!): Unit\n```\n\nCalled when the accessibility button in the system's navigation area is clicked.\n\n| Parameters ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `controller` | [AccessibilityButtonController](/reference/kotlin/android/accessibilityservice/AccessibilityButtonController)!: the controller used to register for this callback |"]]