Climb Tracker for Android and Android wear

Here is how I used Android Wear and Firebase to build from scratch an indoor climb tracker.

Install it on Google Play, read the code on GitHub.

I learnt a few things from a first prototype I did:

  • I do not want to use my phone in a climbing gym,
  • I should not expect to have connectivity in a climbing gym,
  • I care more about the grades of the routes I complete than the routes themselves,
  • The gym’s routes are changing every few months, too quickly to maintain a database.

watch3_framed

So I decided simplify the app to its bare minimum by focusing on this scenario:

From my watch, I log the grade of the routes I complete.

After the session, I can see a list of my climbs on my phone.

Yes, the main scenario uses an wearable device: climbing with a smartwatch is not a problem, it’s always available and does not require to manipulate a phone.

Screenshot-phone1_framed

Also, it’s designed offline first: The watch does not require a phone to be nearby, or any internet connection. Once it gets close to its phone, data is transferred from the watch to the phone (once again, no internet required). The data is then stored locally on the phone and when connectivity is available, is synced to a server.

I then added the ability to add a climb from a phone, as I suppose that the intersection between climbers and Android phone owners is bigger than between climbers and Android wear owners 🙂

The grading system can be selected from the Settings menu and the user’s position is recorded when saving the climb, for potential future use.

Climb Tracker architecture
The Climb Tracker technical architecture

Technically, it is a native Android app, mostly because I needed to use the Wear SDK, but also because I wanted a reliable app experience and not struggle to imitate a native look and feel using web technologies. Transmitting data from the wearable to the phone uses the Android Wear DataApi.

The rest of the app is using the Firebase SDK with offline mode enabled: Firebase is deciding by itself when to sync the data with its server. I did not write any line of data sync or server-side code. And I loved it.

The app is following the latest permissions guidelines: asking them when opening the application, and being flexible regarding the location permission: if not granted, the location is not recorded but the app keeps working.

Get it on Google Play
The app is released on Google Play. It is open source and released on GitHub. Of course, I accept suggestions, bugfixes and pull-requests.

For example, would you like to translate it in your language?

Advertisements

Cloud cup: a multiplayer set of mini games for web and Android

I’m glad to present the work of a week-long hackathon I did last November with three other googlers.

I’ve been having for a long time the idea of a real time game using phones as controller and a big screen as the main game screen. You may recall a previous blog post about a first prototype. A few years later, I could pitch the idea at an internal hackathon and gather a team around the concept. While I initially wanted to build a dancing game, I realized that this was already done, so we decided to go towards mini games, an idea very compatible with a hackathon timeframe.

Realizing after a day that we would not be able to have a reliable and scalable real time architecture and a fun game after just five days using regular backend technologies, we decided to focus on the game itself and to use Firebase to handle the real time and backend parts of our system. It allowed us to get familiar with this very interesting technology. I already used Parse in the past, while they both fall into the Backend as a Service (MBaaS) category, I could notice with pleasure that Firebase was able to perform as well as Parse for the regular MBaaS features (and even better to my taste, by providing an Angukar SDK) but that it also provides impressive real time capabilities.

After a single day, we had a functional prototype of our game: Android phones were interacting in real time with an Angular application in a “Shake” game. The next three days were spent creating other mini games and streamlining the game mechanism.

And we won the Fun category!

While the hackathon was internal, it was not a problem at all for Google to let us open source and release our work to the public. You can find the sources on GitHub: Android and Web. Firebase showcased the project on its official blog.

Try it now: Install the Android app, and visit cloudcup.firebaseapp.com to start a game.

I hope you like it.