Android Wear a Developer Perspective

I’ve added wear support to FreeOTP and put my changes in my GitHub. Eventually I will send a PR to the upstream project and see if they like it. In the meanwhile, my code is available for all to play.

Adding Wear support to FreeOTP was a bit tricky. I had several multi-hour road blocks where seemingly nothing would work and I couldn’t get anything done. This is fortunately normal for learning new tech, but still discouraging. First, Windows didn’t recognize my G Watch and I had to manually install the ADB bridge. Second, I had some bugs in my initial wear project which caused the data sync to silently fail. Finally, the bluetooth debug link to do development on my Moto 360 is ridiculously slow. Far far slower than on the G Watch with a USB connection. So lessons learned: 1) applicationID has to match in all the build.gradle files 2) Use a hardware device with a USB connection not bluetooth and 3) Don’t use Windows for Android development.

As far as writing actual code Android Wear is “just” Android with Google Play Services installed. However, while the API and coding style are the same, the user experience is not. The Wear experience is based around performing very quick actions, showing information which can be consumed in a glance, having very general swiping inputs, and voice commands. Google provides plenty of excellent (closed source) libraries to help with this. Google Play Services plays a huge part in Wear as well. Most of your UI will be build using Google’s Wear library (see: and your communication with the phone will be done over Google Play Services. I haven’t tried establishing my own bluetooth communication layer, but it is ill advised.

The documentation for Wear so far is more practical than theoretical. It focuses on how to do things instead of how things work. This is great for getting apps put together quickly, but I felt like it left out some of the nuance of the system. For instance, there is much on how to use the sync capabilities of the Wear APIs, but the docs aren’t clear on if the synchronized data is stored after the synchronization is complete, how it is transferred, how collisions are checked, etc. The UI views likewise have much of their documentation as JavaDoc which is oddly lacking in some places. For instance GridViewPagerAdapter is left as an exercise for Stackoverflow.

In general, Wear is a nice platform and very comfortable coming from Android. I don’t like that it is far more closed source than Android and very reliant on Google Play Services. I do like that many common tasks are documented and trivial to implement. The cost of adding Wear features to an existing app is very low and it makes for some very useful use cases. The community also seems to be growing and I’ve seen a few reference to a 3rd party sync library, Teleport. Wear has a strong future ahead and is a good platform for investment now.