Stay organized with collections
Save and categorize content based on your preferences.
TouchInteractionController.Callback
public
static
interface
TouchInteractionController.Callback
android.accessibilityservice.TouchInteractionController.Callback
|
callbacks allow services to receive motion events and state change updates.
Summary
Public methods |
abstract
void
|
onMotionEvent(MotionEvent event)
Called when the framework has sent a motion event to the service.
|
abstract
void
|
onStateChanged(int state)
Called when the state of motion event dispatch for this display has changed.
|
Public methods
onMotionEvent
public abstract void onMotionEvent (MotionEvent event)
Called when the framework has sent a motion event to the service.
Parameters |
event |
MotionEvent : the event being passed to the service.
This value cannot be null . |
onStateChanged
public abstract void onStateChanged (int state)
Called when the state of motion event dispatch for this display has changed.
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,["# TouchInteractionController.Callback\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nTouchInteractionController.Callback\n===================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/accessibilityservice/TouchInteractionController.Callback \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nTouchInteractionController.Callback\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------------------------|\n| android.accessibilityservice.TouchInteractionController.Callback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\ncallbacks allow services to receive motion events and state change updates.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onMotionEvent](/reference/android/accessibilityservice/TouchInteractionController.Callback#onMotionEvent(android.view.MotionEvent))`(`[MotionEvent](/reference/android/view/MotionEvent)` event) ` Called when the framework has sent a motion event to the service. |\n| ` abstract void` | ` `[onStateChanged](/reference/android/accessibilityservice/TouchInteractionController.Callback#onStateChanged(int))`(int state) ` Called when the state of motion event dispatch for this display has changed. |\n\nPublic methods\n--------------\n\n### onMotionEvent\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onMotionEvent (MotionEvent event)\n```\n\nCalled when the framework has sent a motion event to the service.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|-------------------------------------------------------------------------------------------|\n| `event` | `MotionEvent`: the event being passed to the service. This value cannot be `null`. \u003cbr /\u003e |\n\n### onStateChanged\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onStateChanged (int state)\n```\n\nCalled when the state of motion event dispatch for this display has changed.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `state` | `int`: the new state of motion event dispatch. Value is [TouchInteractionController.STATE_CLEAR](/reference/android/accessibilityservice/TouchInteractionController#STATE_CLEAR), [TouchInteractionController.STATE_TOUCH_INTERACTING](/reference/android/accessibilityservice/TouchInteractionController#STATE_TOUCH_INTERACTING), [TouchInteractionController.STATE_TOUCH_EXPLORING](/reference/android/accessibilityservice/TouchInteractionController#STATE_TOUCH_EXPLORING), [TouchInteractionController.STATE_DRAGGING](/reference/android/accessibilityservice/TouchInteractionController#STATE_DRAGGING), or [TouchInteractionController.STATE_DELEGATING](/reference/android/accessibilityservice/TouchInteractionController#STATE_DELEGATING) \u003cbr /\u003e |\n\n**See also:**\n\n- [TouchInteractionController.STATE_CLEAR](/reference/android/accessibilityservice/TouchInteractionController#STATE_CLEAR)\n- [TouchInteractionController.STATE_DELEGATING](/reference/android/accessibilityservice/TouchInteractionController#STATE_DELEGATING)\n- [TouchInteractionController.STATE_DRAGGING](/reference/android/accessibilityservice/TouchInteractionController#STATE_DRAGGING)\n- [TouchInteractionController.STATE_TOUCH_EXPLORING](/reference/android/accessibilityservice/TouchInteractionController#STATE_TOUCH_EXPLORING)"]]