DroidMcpAccessibilityService
Abstract base service that host apps subclass to grant droid-mcp the ability to read the on-screen UI and dispatch clicks / gestures / scrolls.
The host app:
Declares a concrete subclass in its manifest with
android.permission.BIND_ACCESSIBILITY_SERVICEand an<intent-filter>forandroid.accessibilityservice.AccessibilityService.Points
<meta-data android:name="android.accessibilityservice" android:resource="@xml/droid_mcp_accessibility_config" />at the shipped default config (or supplies its own).The user enables the service from Settings > Accessibility > Installed apps. The SDK exposes a helper to open that screen directly.
Subclasses MAY override onAccessibilityEvent / onInterrupt to react to events but should call super so the holder stays consistent.
Properties
Functions
No-op by default; tools poll the tree on demand rather than reacting to events. Subclasses may override to observe events.
No-op by default. Subclasses may override.