[Wear OS Software and Hacking General] ginkage:
Today I’m going to bring a little bit of magic to your Wear OS watch.

As you know from the earlier post, Android Pie has introduced a new public API for using your Android device as a Bluetooth HID Device (e.g. mouse, keyboard, gamepad, etc.), so I built a simple app that demonstrates one of the possible ways you can use this API. Also, see below for a little surprise regarding compatibility...

So, you have probably already guessed from the title what the app does: it allows you to control the mouse pointer simply by waving your hand. It is compatible with any Windows, OSX, Linux (including Raspbian), Chrome OS, Android (including Android TV) device, as long as it has a Bluetooth radio; no root, no “server” software required. Just launch the app, perform Bluetooth pairing, and then you’ll be able to:

Use it as an intuitive pointer for presentations (and also click through the slides using cursor keys);

Play Fruit Ninja with your arms (e.g. by sideloading it on Android TV, or installing it on a Chromebook from the Play Store);

Control a media player from the sofa (e.g. when using a computer connected via HDMI);

Use it as a VR controller in some Cardboard games to walk around (not for Daydream though, since it has its own controller);

Impress your friends with some telekinetic powers. :)

Control your DeX-connected phone;

Download

Play Store

Source (Note: the source code doesn't include the Oreo hack)

How to use it

The app features three input modes: air mouse, cursor keys and keyboard input.

The air mouse mode is pretty straightforward. It has two on-screen buttons for left and right click, a top drawer to adjust motion tracking for the way you’re wearing your watch (on your left wrist, on your right wrist, or holding it in your hand like a laser pointer), and a bottom drawer for some extra functions: click and hold (a.k.a. Fruit Ninja mode) and middle click. If your watch is equipped with a rotating crown, you can use it for scrolling as well.

The cursor keys mode is simple enough: tap on the sides of the screen to trigger corresponding keys, double-tap in the center to trigger the Enter key, long-press to quit, and there are also swipe gestures for Escape, Backspace, Space and Tab keys.

Finally, the keyboard input mode allows using either an on-screen keyboard, or voice input. Note, though, that the text you’ll see entered on your connected device depends on your keyboard layout. Only US English is supported at the moment (I can add some more, but that will require you to manually switch the layout both in the app and on the device every time).

If your watch has some extra keys, you can use those to quickly switch between the input modes.

There are also some settings available. You can choose to stabilize the pointer movements (this will smooth out smaller motions like hands shaking), enable diagonal movements for the cursor keys (which is useful for those Cardboard games), or reduce the data rate (which is helpful when you use the app with some older Nougat-based Android TV box, and the mouse pointer just can’t keep up).

A word on compatibility.

Like I said, the API was made public in Android Pie, but (as a belated Christmas present) the app will work on any watch running Oreo as well. That is, when reboot your watch, and after the trippy dots animation you see a big colorful “W” and “Wear OS by Google” instead of the “Android Wear” logo, you should be fine. The API was introduced in Oreo, and it was a bit different (and also hidden) at the time, but before Pie is was only enabled on watches by default. There is a way to enable it on phones as well, but it requires root.

A few tips for troubleshooting.

If you connect and see that the mouse pointer is moving once per second in a really janky way, try turning Airplane mode on your watch on and off, and then reconnect. Looks like there is some occasional issue with power management in the Bluetooth stack…

If you want to adjust the “sensitivity”, please look for the pointer speed setting on the connected device, not in the app itself.

If you are using the app with a device that is connected to a TV, you’ll probably want to switch your TV to the “Game” picture mode. This should turn off any post-processing that may cause a lot of lag on modern TVs.

I also recommend turning off wrist gestures in your watch’s settings when you use the air mouse mode, otherwise there’s a high chance of triggering the “back” or “go home” gesture.