Skip to content

Latest commit

 

History

History

WatchFaceFormat

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Watch Face Format Sample

A sample demonstrating the structure of Watch Face Format watch faces

Introduction

The Watch Face Format (WFF) allows developers to build watch faces, and watch face design tools in a XML format.

This sample demonstrates the basic structure of a WFF watch face, and how it should be packaged for uploading to Play or for local testing on an emulator or device.

For more details on the Watch Face Format, see:

Samples

There are currently three samples available:

  • SimpleDigital - A basic digital watch face.
  • SimpleAnalog - A basic analog watch face.
  • Complications - Demonstrates using Complications in a watch face and rendering data from Complication data sources.

Building the samples

Use Gradle to build each of the samples. For example, to build the SimpleDigital debug build:

cd SimpleDigital
./gradlew assembleDebug

To then install and set as the current watch face on a device or emulator:

adb install watchface/build/outputs/apk/debug/watchface-debug.apk
adb shell am broadcast -a com.google.android.wearable.app.DEBUG_SURFACE --es operation set-watchface --es watchFaceId com.example.simpledigital

For more guidance on building and signing release builds, see signing guidance on developer.android.com

Debugging

  1. Use the XML validator to confirm that the XML in watchface.xml is valid.

  2. Use logcat to look for any error messages from the WFF runtime, such as potential errors in WFF expressions.

    adb logcat --pid=$(adb shell pidof -s com.google.wear.watchface.runtime)

Support