1*90c8c64dSAndroid Build Coastguard Worker 2*90c8c64dSAndroid Build Coastguard Workerpage.tags="WatchFace" 3*90c8c64dSAndroid Build Coastguard Workersample.group=Wearable 4*90c8c64dSAndroid Build Coastguard Worker@jd:body 5*90c8c64dSAndroid Build Coastguard Worker 6*90c8c64dSAndroid Build Coastguard Worker<p> 7*90c8c64dSAndroid Build Coastguard Worker 8*90c8c64dSAndroid Build Coastguard WorkerThis sample demonstrates how to create watch faces for android wear and includes a phone app 9*90c8c64dSAndroid Build Coastguard Workerand a wearable app. The wearable app has a variety of watch faces including analog, digital, 10*90c8c64dSAndroid Build Coastguard Workeropengl, calendar, steps, interactive, etc. It also includes a watch-side configuration example. 11*90c8c64dSAndroid Build Coastguard WorkerThe phone app includes a phone-side configuration example. 12*90c8c64dSAndroid Build Coastguard Worker 13*90c8c64dSAndroid Build Coastguard WorkerBecause watch face apps do not have a default Activity in their project, you will need to set your 14*90c8c64dSAndroid Build Coastguard WorkerConfigurations to "Do not launch Activity" for both the Wear and Application modules. If you are 15*90c8c64dSAndroid Build Coastguard Workerunsure how to do this, please review the "Run Starter project" section in the 16*90c8c64dSAndroid Build Coastguard Worker[Google Watch Face Code Lab][1]. 17*90c8c64dSAndroid Build Coastguard Worker 18*90c8c64dSAndroid Build Coastguard WorkerFor the Fit Distance related watch face, authentication IS a requirement to request distance from 19*90c8c64dSAndroid Build Coastguard WorkerGoogle Fit on Wear. Otherwise, distance will always come back as zero (or stay at whatever the 20*90c8c64dSAndroid Build Coastguard Workerdistance was prior to you de-authorizing the watch face). 21*90c8c64dSAndroid Build Coastguard Worker 22*90c8c64dSAndroid Build Coastguard WorkerTo authenticate and communicate with Google Fit, you must create a project in the Google Developers 23*90c8c64dSAndroid Build Coastguard WorkerConsole, activate the Fitness API, create an OAuth 2.0 client ID, and register the public 24*90c8c64dSAndroid Build Coastguard Workercertificate from your signed APK. More details can be found [here][2]. 25*90c8c64dSAndroid Build Coastguard Worker 26*90c8c64dSAndroid Build Coastguard WorkerIf the user has not installed or setup the Google Fit app on their phone and their Wear device has 27*90c8c64dSAndroid Build Coastguard Workernot configured the Google Fit Wear App, then you may get zero steps until one of the two is setup. 28*90c8c64dSAndroid Build Coastguard WorkerPlease note, many Wear devices configure the Google Fit Wear App beforehand. 29*90c8c64dSAndroid Build Coastguard Worker 30*90c8c64dSAndroid Build Coastguard Worker[1]: https://codelabs.developers.google.com/codelabs/watchface/index.html 31*90c8c64dSAndroid Build Coastguard Worker[2]: https://developers.google.com/fit/android/get-started#step_3_enable_the_fitness_api 32*90c8c64dSAndroid Build Coastguard Worker 33*90c8c64dSAndroid Build Coastguard Worker </p> 34