tapwithus/tap-android-sdk/tap-android-imu-motion
Claude Code and agent skill by tapwithus/tap-android-sdk
- community
Checking that the SKILL.md file is still in the repository.
Use Tap hand motion on Android — ImuMotionPacket (dx, dy, roll, pitch, yaw) on the framed protocol and MousePacket on classic firmware — to move a cursor, steer, tilt, or rotate. Use for air mouse, pointer, cursor, tilt, euler angles, or motion-driven UI. Requires tap-android-getting-started order: getDefault, registerTapListener, resume and pause.
Install
npx vskill@latest install tapwithus/tap-android-sdk/tap-android-imu-motionSKILL.md
IMU motion and mouse
The two BLE protocols report motion on different callbacks. Both can be connected at once; branch on sdk.isV2Tap(id). That check is the framed protocol, not a second SDK.
Framed protocol: IMU motion
Controller mode enables DeviceFeature.IMU_MOTION_DATA on connect. You can also call sdk.setFeature(id, DeviceFeature.IMU_MOTION_DATA, true) after onTapConnected.
dx,dy: signed pointer deltas since the last packet. Add them to a cursor position.isMouse: true when the device treats the motion as pointer movement.roll,pitch,yaw: signed orientation in degrees.- Turn the feature off with
setFeature(id, DeviceFeature.IMU_MOTION_DATA, false)to save battery. - Motion works together with
MODEL_DETECTION(air gestures). Thetap-android-knobandtap-android-dpadskills combine them. - Classic firmware does not call
onImuMotionInputReceived.
Classic protocol: mouse events
Controller mode (or controller-with-mouse HID) delivers:
dx/dy: signed velocities (PacketValue.getInt()).proximity: non-zero when a surface is detected (optical mouse on Tap Strap).- Classic packets have no euler angles. For orientation on classic firmware, use raw IMU (
tap-android-raw-sensors). - Choosing air-mouse versus tapping on TapXR is
startXRAirMouseState(id)/startXRTappingState(id), not a separate input-type enum.
The framed protocol also forwards pointer deltas on onMouseInputReceived. Prefer onImuMotionInputReceived when you need roll, pitch, and yaw.
Patterns
Post to the main thread before touching a View.
Cursor (clamp to bounds, optional gain):
Relative rotation (roll as a dial): store the roll when the user starts (for example on a pinch-hold), then use roll - reference. Do not use absolute roll. It depends on how the hand is held. See tap-android-knob.
Smoothing: smooth = alpha * value + (1 - alpha) * smooth with alpha around 0.3.
Dead zone: ignore Math.abs(dx) + Math.abs(dy) < 2 so a still hand does not drift.
Rate: count packets per second if timing matters. Do not assume a fixed rate.
If a direction is inverted on the user's device, flip the sign. Ask the user to test and tell you.
Docs in this repo
ImuMotionPacketandMousePacket:tap-android-sdkskill,reference.md- Example app handles mouse and air-gesture rows in
MainActivity
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/tap-android-sdk/skills/tap-android-imu-motion/SKILL.md
Popularity
- Repository stars
- 31
- Repository forks
- 7
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tapwithus/tap-android-sdk/tap-android-imu-motion)