O'Reilly logo

Android Wearable Programming by Steven F. Daniel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a custom watch face service class

In this section, we will proceed to create our custom watch face service class that will be used to invoke the methods within the watch face service API. This class will be responsible for allocating and initializing the resources that our watch face requires. Watch faces are services and shouldn't be confused with activities, as these types of services only accept touch input and voice commands as a form of interaction.

First, we need to create a new class called WatchFaceService:

  1. From the Project Navigator window, expand the wear section and select and expand the java section.
  2. Next, right-click and choose the New | Java Class menu option:
  3. Then, enter WatchFaceService to be used as the name for our class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required