/tap-android-sdk:tap-android-imu-motionfrom tap-android-sdk
Processes Tap hand motion data on Android, including IMU motion packets (dx, dy, roll, pitch, yaw) and classic mouse packets for cursor movement, steering, tilt, or rotation. Useful for air mouse, pointer, or motion-driven UI.
Ships in tap-android-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
Controller mode enables DeviceFeature.IMU_MOTION_DATA on connect. You can also call sdk.setFeature(id, DeviceFeature.IMU_MOTION_DATA, true) after onTapConnected.
@Override
public void onImuMotionInputReceived(String id, ImuMotionPacket packet) {
int dx = packet.dx;
int dy = packet.dy;
boolean isMouse = packet.isMouse;
int roll = packet.roll;
int pitch = packet.pitch;
int yaw = packet.yaw;
}
override fun onImuMotionInputReceived(id: String, packet: ImuMotionPacket) {
val dx = packet.dx
val dy = packet.dy
val roll = packet.roll
}
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.setFeature(id, DeviceFeature.IMU_MOTION_DATA, false) to save battery.MODEL_DETECTION (air gestures). The tap-android-knob and tap-android-dpad skills combine them.onImuMotionInputReceived.Controller mode (or controller-with-mouse HID) delivers:
@Override
public void onMouseInputReceived(String id, MousePacket data) {
int vx = data.dx.getInt();
int vy = data.dy.getInt();
int proximity = data.proximity.getInt();
}
dx / dy: signed velocities (PacketValue.getInt()).proximity: non-zero when a surface is detected (optical mouse on Tap Strap).tap-android-raw-sensors).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.
Post to the main thread before touching a View.
Cursor (clamp to bounds, optional gain):
float x = 400, y = 300;
void onMotion(int dx, int dy) {
x = Math.max(0, Math.min(width, x + dx * gain));
y = Math.max(0, Math.min(height, y + dy * 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.
ImuMotionPacket and MousePacket: tap-android-sdk skill, reference.mdMainActivityWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub tapwithus/tap-android-sdk --plugin tap-android-sdk9 skills in this plugin
/tap-android-build-an-appBuild a complete Android app or interactive experience controlled by a Tap — games, presentations, media control, or creative tools. Use when the user asks to build, make, or create something with their Tap on Android. Start with tap-android-getting-started: TapSdkFactory.getDefault, registerTapListener, resume and pause. getDefault() alone delivers no taps./tap-android-dpadBuild a D-Pad style controller on Android with a Tap — swipes for directions, short pinches to select, pinch-hold that locks into rotate (twist) or drag (move), fist-hold to hide. Use for D-Pad, menu navigation, drag and drop, or game controls. Needs the framed BLE protocol (current TapXR developer firmware; TapBand uses the same API). Requires tap-android-getting-started order: getDefault, registerTapListener, resume and pause./tap-android-getting-startedFirst skill for any Tap Android app. The order is TapSdkFactory.getDefault(context), then registerTapListener, then resume() in onResume and pause() in onPause. getDefault() alone delivers no taps. There is no connect() or start() method. Use for the Gradle dependency, Bluetooth permissions, pairing, "connect to my Tap", setup, or no tap events./tap-android-knobBuild a virtual knob on Android with a Tap — hold a pinch and twist the wrist to turn a value up or down (volume, brightness, zoom, scroll). Use for knob, dial, twist, rotate-to-adjust, or continuous value control. Needs the framed BLE protocol (current TapXR developer firmware; TapBand uses the same API). Requires tap-android-getting-started order: getDefault, registerTapListener, resume and pause./tap-android-raw-sensorsStream raw accelerometer and gyroscope samples from a Tap on Android (classic raw mode or framed RAW_IMU_DATA) and set sensitivity. Use for raw sensors, raw IMU, accelerometer, gyro, data logging, or custom gesture recognition. Requires tap-android-getting-started order: getDefault, registerTapListener, resume and pause./tap-android-sdkAPI reference for the TAP Android SDK (com.tapwithus.sdk): TapSdk, TapListener, modes, framed-protocol features, haptics. Use when you need a method, callback, or data-type detail. For a new app, use tap-android-getting-started first. Order: TapSdkFactory.getDefault(context), then registerTapListener, then resume() in onResume and pause() in onPause. getDefault() alone delivers no taps. There is no connect() or start() method.Other plugins' skills for the same job