Chapter    14

Watch Face Configuration Companion Activity Utility and Wearable API

Now that you have coded the foundation Activity class for your watch face companion configuration Activity in the mobile section of your project, it is time to create the ProWatchFaceUtility class that will live in the wear section of your project. This class will define the configuration setting constants and house the functions (methods) that manipulate them, using DataMap, DataItem and DataMapItem objects, along with the Wearable class’s API, DataApi, NodeApi, and MessageApi attributes (data fields). You will be learning all about this Wearable class, and its APIs, during this chapter.

You will also be using XML markup during this chapter to create your user ...

Get Pro Android Wearables: Building Apps for Smartwatches now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.