Stacks Image 234

Android Nanodegree: Vel9 Watchface
View project on GitHub

Stacks Image 126
Vel9 Watchface was developed on the Moto 360 for Udacity's Android Nanodegree. The wearable-focused project required use of the Sunshine weather app developed throughout the Developing Android Apps: Fundamentals and Advanced Android App Development courses. Sunshine displays weather data using the OpenWeather API. The project required us to create an Android watchface by integrating with the existing Sunshine app.

The Android watchface has been one of my nanodegree project so far. Getting the communication up and running between the wearable and mobile device was one of the those eyes-lighting-up-when-code-works moments. Here are some of the key features:

  • Wearable sends a message using the MessageApi, a request for weather data, a type of "ping," to the mobile device every 30 minutes.
  • Mobile device listens for the request for weather data and fetches the most up-to-date weather data on the device using the Content Provider.
  • Mobile device then packages a DataItem response containing only three data values: high temperature, low temperature and icon Asset.
  • The wearable module provides a listener service which listens for the data from the mobile device, and processes the icon Asset to a Bitmap.
  • Once the data is gathered in wearable listener service, the data is broadcast to the watchface using LocalBroadcastManager.
  • The watchface then updates display variables with new data.

Here's the watchface screenshot:
Stacks Image 226