/tap-android-sdk:tap-android-knobfrom tap-android-sdk
Builds a virtual knob on Android using Tap gestures — pinch-hold and wrist twist to control continuous values like volume, brightness, zoom, or scroll. Requires TapXR/TapBand with framed BLE protocol.
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.
Read when SKILL.md points to them.
Needs the framed protocol (sdk.isV2Tap(id)): air-gesture holds and IMU roll. Classic mouse packets have no roll. This is the same interaction as the Knob in the TAP_EV sandbox (https://tapwithus.github.io/TAP_EV/).
TapBand uses the same BLE API as TapXR and is coming soon: https://www.tapwithus.com/tapband-waitlist/. Current TapXR developer firmware includes pinch-with-hold in the full gesture set.
You can drive the tracker from raw UnifiedAirGesture codes (same detections every Tap SDK sees) or from processed XRAirGesture (DRAG_* / DROP). The template below takes raw codes.
AB_HOLD..AE_HOLD (codes 110–113). That grabs a knob. Each pinch is a separate knob, so one hand controls 4 values.onImuMotionInputReceived turns the knob. The roll at grab time is the reference. Every stepDeg of roll away from it is one step.releaseAfter consecutive NONE (100) packets, the knob is released. Waiting for several packets stops one noisy packet from dropping the grab.Copy java/KnobTracker.java into the app (package com.tapwithus.tapsdk.sample; change it if your app uses another package). It has no Android or SDK imports.
onGesture(code) returns "start", "release", or null.onRoll(roll) returns signed int steps (0 when idle).active is the knob index 0–3 (AB, AC, AD, AE), or null.Required device setup, from onTapConnected when sdk.isV2Tap(id):
sdk.setFeature(id, DeviceFeature.MODEL_DETECTION, true);
sdk.setVisionSensorModel(id, VisionSensorModel.AIR_GESTURE);
sdk.setVisionSensorOpMode(id, VisionSensorOpMode.STREAM);
sdk.setFeature(id, DeviceFeature.IMU_MOTION_DATA, true);
startXRAirMouseState(id) covers the vision model and STREAM op-mode. Controller mode already enables IMU_MOTION_DATA. Calling both is safe.
Wiring (callbacks may be off the main thread; update Views on the main thread):
KnobTracker knob = new KnobTracker(2.0, 4);
int[] values = {50, 50, 50, 50};
void onAir(AirMousePacket data) {
UnifiedAirGesture gesture = UnifiedAirGesture.fromCode(data.gesture.getInt());
if (gesture == null) return;
String event = knob.onGesture(gesture.getCode());
if ("start".equals(event)) {
sdk.vibrate(id, new int[]{40});
}
}
void onMotion(ImuMotionPacket packet) {
int steps = knob.onRoll(packet.roll);
if (steps != 0 && knob.active != null) {
int i = knob.active;
values[i] = Math.max(0, Math.min(100, values[i] + steps));
}
}
If isV2Tap is false, the connected device is on classic firmware (no IMU roll on this callback). Use tap combos (tap-android-tapping) or ask the user to update TapXR firmware in Tap Manager. Do not fake roll from classic MousePacket dx/dy.
| Setting | Default | Effect |
|---|---|---|
stepDeg | 1 (template example uses 2) | Degrees of roll per step. Larger = slower. 1–2 for fine values, 5–10 for menu items. |
releaseAfter | 4 | NONE packets before release. Raise it if the knob drops while still pinching. |
-steps.vibrate(id, new int[]{40})). Do not buzz on every step.KnobTracker.wrapDegrees handles the crossing.stepDeg = 8.See also tap-android-dpad and tap-android-vision-models.
What SKILL.md sets; muted values are Claude Code's defaults
9 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-startednpx claudepluginhub tapwithus/tap-android-sdk --plugin tap-android-sdkOther plugins' skills for the same job