Demonstrates watch faces using the androidX libraries (Kotlin). The newer Watch Face Format (WFF) is recommended in preference to using these libraries.
The AndroidX watch face libraries allow you to develop a watch face service in Kotlin. However, WFF is strongly recommended in preference to this approach.
Because a watch face only contains a service, that is, there is no Activity, you first need to turn off the launch setting that opens an Activity on your device.
To do that (and once the project is open) go to Run -> Edit Configurations. Select the app module and the General tab. In the Launch Options, change Launch: to Nothing. This will allow you to successfully install the watch face on the Wear device.
When installed, you will need to select the watch face in the watch face picker, i.e., the watch face will not launch on its own like a regular app.
This sample uses the Gradle build system. To build this project, use the "gradlew build" command or use "Import Project" in Android Studio.
- Stack Overflow: https://stackoverflow.com/questions/tagged/wear-os
If you've found an error in this sample, please file an issue: https://github.com/android/wear-os-samples
Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.