Stay organized with collections
Save and categorize content based on your preferences.
OnAccessibilityEventListener
interface OnAccessibilityEventListener
Listener for observing the AccessibilityEvent
stream.
Summary
Public methods
onAccessibilityEvent
abstract fun onAccessibilityEvent(event: AccessibilityEvent!): Unit
Callback for receiving an AccessibilityEvent
.
Note: This method is NOT executed on the main test thread. The client is responsible for proper synchronization.
Note: It is responsibility of the client to recycle the received events to minimize object creation.
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,["# UiAutomation.OnAccessibilityEventListener\n\nAdded in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnAccessibilityEventListener\n============================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/UiAutomation.OnAccessibilityEventListener \"View this page in Java\") \n\n```\ninterface OnAccessibilityEventListener\n```\n\n|------------------------------------------------------------|\n| [android.app.UiAutomation.OnAccessibilityEventListener](#) |\n\nListener for observing the [AccessibilityEvent](../view/accessibility/AccessibilityEvent.html#) stream.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAccessibilityEvent](#onAccessibilityEvent(android.view.accessibility.AccessibilityEvent))`(`event:` `[AccessibilityEvent](../view/accessibility/AccessibilityEvent.html#)!`)` Callback for receiving an [AccessibilityEvent](../view/accessibility/AccessibilityEvent.html#). |\n\nPublic methods\n--------------\n\n### onAccessibilityEvent\n\nAdded in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onAccessibilityEvent(event: AccessibilityEvent!): Unit\n```\n\nCallback for receiving an [AccessibilityEvent](../view/accessibility/AccessibilityEvent.html#).\n\n**Note:** This method is **NOT** executed on the main test thread. The client is responsible for proper synchronization.\n\n**Note:** It is responsibility of the client to recycle the received events to minimize object creation.\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------|\n| `event` | [AccessibilityEvent](../view/accessibility/AccessibilityEvent.html#)!: The received event. |"]]