npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tauri-plugin-android-accessibility-api

v0.2.2

Published

A Tauri plugin that supports Android accessibility features, allowing Tauri applications to interact with Android's accessibility services for enhanced functionality and user experience.

Readme

Tauri Plugin Android Accessibility

简体中文

A mobile plugin based on Tauri v2 for Android accessibility bridging, providing the following capabilities:

  • Check if accessibility services are enabled
  • Jump to the system accessibility settings page
  • Get a UI tree snapshot of the current foreground window
  • Perform click/long press/focus by node ID (supports falling back to a clickable parent node)
  • Simulate gestures (tap, long press, swipe/drag, multi-touch)
  • Trigger global system actions (back, home, recents, notifications, etc.)
  • Perform generic node actions (scroll, focus navigation, selection)

1. Functional Description

This plugin is designed for Android and consists of a Kotlin accessibility service and a Rust/JS bridge.

  • Rust plugin name: android-accessibility
  • Kotlin plugin class: AndroidAccessibilityPlugin
  • Kotlin accessibility service: TauriAccessibilityService

Implementation entry points:

2. Usage in Tauri App

Directly add:

bun tauri add android-accessibility

Or add it manually as follows:

Register the plugin on the application side:

tauri::Builder::default()
        .plugin(tauri_plugin_android_accessibility::init())
        .run(tauri::generate_context!())
        .expect("error while running tauri application");

JS side (it is recommended to use bun for dependency installation and building):

bun install
bun run build

Example call:

import {
        checkAccessibilityEnabled,
        openAccessibilitySettings,
        getFrontmostUiTree,
        clickNode,
        performGesture,
        performGlobalAction,
        performNodeAction,
} from 'tauri-plugin-android-accessibility-api'

const status = await checkAccessibilityEnabled()
if (!status.enabled) {
        await openAccessibilitySettings()
}

const tree = await getFrontmostUiTree({
        maxDepth: 8,
        maxChildrenPerNode: 40,
        includeNonClickable: true,
})

await clickNode({
        nodeId: '0.1.2',
        action: 'click',
        fallbackToClickableParent: true,
})

await performGesture({
        strokes: [
                {
                        points: [
                                { x: 540, y: 1500 },
                                { x: 540, y: 700 },
                        ],
                        durationMs: 320,
                },
        ],
})

await performGlobalAction({ action: 'back' })

await performNodeAction({
        nodeId: '0.1.0',
        action: 'scrollForward',
        fallbackToScrollableParent: true,
})

3. API List

checkAccessibilityEnabled

Returns:

  • enabled: Whether the current app's accessibility service is enabled
  • serviceId: Current service component ID
  • enabledServices: List of accessibility services currently enabled by the system

openAccessibilitySettings

Opens the system accessibility settings page, returns opened.

getFrontmostUiTree

Parameters:

  • maxDepth: Tree depth limit
  • maxChildrenPerNode: Maximum number of child nodes per node
  • includeNonClickable: Whether to include non-clickable leaf nodes

Returns:

  • timestampMs
  • packageName
  • root (recursive UI node)

clickNode

Parameters:

  • nodeId: Node path ID in the UI tree (e.g., 0.1.2)
  • action: click | longClick | focus
  • fallbackToClickableParent: Whether to fall back to a parent node click if the target fails

Returns:

  • success
  • performedOnNodeId
  • message

performGesture

Parameters:

  • strokes: Array of gesture strokes
  • strokes[].points: Path points as [{ x, y }, ...]
  • strokes[].startTimeMs: Relative start time for this stroke (optional)
  • strokes[].durationMs: Duration of the stroke in milliseconds
  • strokes[].willContinue: Whether the stroke should continue (optional)

Notes:

  • Tap: 1 point + short duration
  • Long press: 1 point + long duration
  • Swipe/drag: 2 or more points
  • Multi-touch: multiple strokes in one request

Returns:

  • success
  • message

performGlobalAction

Parameters:

  • action: back | home | recents | notifications | quickSettings | powerDialog | lockScreen | takeScreenshot

Returns:

  • success
  • message

performNodeAction

Parameters:

  • nodeId: Node path ID in the UI tree
  • action: click | longClick | focus | clearFocus | select | clearSelection | scrollForward | scrollBackward
  • fallbackToScrollableParent: Whether to fallback to a scrollable parent for failed scroll actions

Returns:

  • success
  • performedOnNodeId
  • message

4. Android Specifications and Limitations

  • Accessibility services are highly sensitive capabilities and must be manually authorized by the user in the system settings.
  • This plugin does not attempt to bypass the system authorization process and will not silently enable accessibility.
  • Reading the foreground app's UI tree depends on the system's visible windows and Android version behavior; results may be empty.
  • Node clicks are affected by the target app's protection policies, dynamic UI states, and accessibility flags; 100% success is not guaranteed.
  • Before submitting to an app store, please clearly inform users of the collection scope and purpose, and follow the app market's privacy and accessibility policies.

5. Permissions and Manifest