Since ustwo published the Android Wear watch faces in early December, one of the most frequent requests we’ve received from the community has been to share more on the engineering resources used to build the watch faces. The much anticipated resource is finally here. Clockwise is a fully tested, open-sourced Android Wear watch face framework developed as an extension of the official Google API. We hope this new tool helps developers make even better watch faces and triggers a thriving community around watch face development. ustwo engineer Mitch Todd shares learnings and insights from the experience of creating and using Clockwise.
What does a framework do and what do we expect Clockwise to do for the dev community?
We viewed a framework as a shared package that developers could reuse to build similar components—in this case, watch faces. Our expectation is that Clockwise will help developers to more easily consider the nuances of developing watch faces on the Android Wear platform, including hardware specifications and battery life. Over the course of our time building and rebuilding watch faces, we improved these tools and knew others would benefit from using them and building upon them. We hope Clockwise will aid developers dealing with the platform constraints in an easy way, so they can focus on creating awesome watch faces!
When did you realize you needed to start building Clockwise and why did you decide to make it open source?
Phase 1 of our work with Google had us building 8 pre-bundled watch faces. After we built the first few, it quickly became clear that we needed to break out some common functionality, not only for more efficient code reuse, but also to shield the watch face development from the instability of the SDK during a tight timeline. This led to a “watch face framework” that was made available to developers here at ustwo while we worked through the next phase of watch faces. By that time we also realized that there was already a development community out there excited to build their very own watch faces, and inevitably facing all the same challenges that we encountered during the last 6 months. Therefore, we believed we could provide substantial value to the watch face developer community by building and sharing Clockwise, and decided to go open source with it!
What were the biggest challenges building Clockwise?
One of the biggest challenges was trying to build an extension of an API that wasn’t completely mature yet. That required us to be very flexible and quick to adapt. Managing the hardware ecosystem was another challenge, as we struggled sometimes to keep the latest SDK in sync with multiple types of watches flashed with, at times, unstable system images. Finally, it is always a challenge to make performance a forethought when writing code, and this is especially critical when developing for wearables. With Clockwise, we defined a method for building watch faces to help overcome this obstacle. Ultimately, this is a core feature of this framework.
Which tools did you use to build Clockwise?
We utilized the same development tools used to create our watch faces, including Android Studio, the Android Early Access Preview SDK/API (and eventually, the publicly released versions), and as many watches as we could get our hands on. We used GitHub for source control and documentation, Jenkins for CI, and we recently published the .aar to the Maven Central Repository.
How did you test the code and how often?
We tested Clockwise in a few different manners. First, we had a QA team that developed and executed a pretty extensive functional test plan for our watch faces as well as the framework. We also had some pretty basic unit testing of our utility classes that we ensured were run as part of our development process. Finally, and perhaps most importantly, we had our development crew building a variety of watch faces on top of the framework, which resulted in valuable feedback with tens of thousands of users ultimately testing Clockwise.
What are the current limitations of the framework?
Clockwise actually started off with quite a bit more functionality, but during the last major refactor, we decided some parts weren’t quite ready for primetime and we stripped them out. Clockwise currently includes a wearable module, but we’re excited to reintroduce an app module (for the phone) that can support watch face configuration and data integration in an upcoming release. This functionality currently exists in our watch faces, samples, and documentation already, but we plan to extract it into Clockwise as soon as possible given the foreseeable demand.
How was Google’s involvement throughout the process of building Clockwise? Were you given any specific feedback or direction?
As I mentioned, it is a difficult challenge to develop a framework on top of something that is itself still being developed. That said, Google was very helpful in terms of letting us know about upcoming API changes and providing supporting materials, as well as having several valuable points of contact. We had a very efficient 2-way communication where we would provide our feedback and experiences with the early access watch face API and they gave us feedback on our watch faces and the framework.
Ustwo has already developed several watch faces: Can you tell us a bit about Google’s standards when it comes to delivering code?
So far, we've delivered 8 of the first watch faces to be shipped with devices after I/O in June 2014 - Aviator, Coordinates, Dashboard, Digitalog, Orbit, Planetary, Polar, Reveal, and Rings. Google was very receptive to working within ustwo's development processes for source code delivery, and we worked closely with them to define a custom process utilizing our private GitHub channel. Google certainly maintains an expectation for high quality, so they had multiple developers thoroughly reviewing each source code delivery and once satisfied, we deployed the watch faces to their internal "dogfooders" for user testing.
What resources are needed for an individual to create and deploy a fully functioning Android watch face into the Google Play Store?
Google has excellent documentation on how developers can get their environment setup to start building and deploying watch faces. We consider this understanding a prerequisite to utilizing Clockwise to build your watch faces.
What is the minimum knowledge you need to start using Clockwise?
We recommend becoming familiar with the Android Wear Watch Face API as well as having a firm understanding of the watch face design guidelines. Clockwise is an extension of the way watch faces are currently developed on the Wear platform, so much of the existing rules and documentation are still valid. We also compiled substantial documentation of Clockwise in our GitHub Wiki, which includes many useful code samples to help developers get started.
How can the community provide feedback to this framework?
First off, we would love to hear any and all feedback from the development community. There are a number of channels we will be monitoring frequently. If you have proposed changes or improvements, you can fork the repository and submit a pull request through GitHub. We are also using the GitHub Issues for bugs, feature requests, etc. And finally, you can always email us at email@example.com!
Now that Clockwise is made public, what would you recommend to someone trying to build a framework?
I would certainly recommend having as many developers as possible using the framework and providing feedback before making it public. It was invaluable for Clockwise to have our own developers kicking the tires and submitting issues and feature requests prior to release. After all, the goal is to provide as much value to the development community as possible, and what better way to assess that value than to gather feedback from your fellow developers!
Developing Clockwise was one of ustwo NYC’s biggest engineering challenges. How big is the dev team at ustwo in New York and what’s the next challenge for this team?
The dev team in NYC is 7 strong (3 Android) and growing! One of our current challenges is to build upon our already talented dev team, so if you’re a developer reading this and interested in ustwo, give us a shout! We have a lot of exciting things coming, especially on the wearable tech front.