1 2Android WatchFace Sample 3=================================== 4 5This sample demonstrates how to create watch faces for android wear and includes a phone app 6and a wearable app. The wearable app has a variety of watch faces including analog, digital, 7opengl, calendar, steps, interactive, etc. It also includes a watch-side configuration example. 8The phone app includes a phone-side configuration example. 9 10Because watch face apps do not have a default Activity in their project, you will need to set your 11Configurations to "Do not launch Activity" for both the Wear and Application modules. If you are 12unsure how to do this, please review the "Run Starter project" section in the 13[Google Watch Face Code Lab][1]. 14 15For the Fit Distance related watch face, authentication IS a requirement to request distance from 16Google Fit on Wear. Otherwise, distance will always come back as zero (or stay at whatever the 17distance was prior to you de-authorizing the watch face). 18 19To authenticate and communicate with Google Fit, you must create a project in the Google Developers 20Console, activate the Fitness API, create an OAuth 2.0 client ID, and register the public 21certificate from your signed APK. More details can be found [here][2]. 22 23If the user has not installed or setup the Google Fit app on their phone and their Wear device has 24not configured the Google Fit Wear App, then you may get zero steps until one of the two is setup. 25Please note, many Wear devices configure the Google Fit Wear App beforehand. 26 27[1]: https://codelabs.developers.google.com/codelabs/watchface/index.html 28[2]: https://developers.google.com/fit/android/get-started#step_3_enable_the_fitness_api 29 30Pre-requisites 31-------------- 32 33- Android SDK 25 34- Android Build Tools v25.0.2 35- Android Support Repository 36 37Getting Started 38--------------- 39 40This sample uses the Gradle build system. To build this project, use the 41"gradlew build" command or use "Import Project" in Android Studio. 42 43Support 44------- 45 46- Google+ Community: https://plus.google.com/communities/105153134372062985968 47- Stack Overflow: http://stackoverflow.com/questions/tagged/android 48 49If you've found an error in this sample, please file an issue: 50https://github.com/googlesamples/android-WatchFace 51 52Patches are encouraged, and may be submitted by forking this project and 53submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details. 54 55License 56------- 57 58Copyright 2016 The Android Open Source Project, Inc. 59 60Licensed to the Apache Software Foundation (ASF) under one or more contributor 61license agreements. See the NOTICE file distributed with this work for 62additional information regarding copyright ownership. The ASF licenses this 63file to you under the Apache License, Version 2.0 (the "License"); you may not 64use this file except in compliance with the License. You may obtain a copy of 65the License at 66 67http://www.apache.org/licenses/LICENSE-2.0 68 69Unless required by applicable law or agreed to in writing, software 70distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 71WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 72License for the specific language governing permissions and limitations under 73the License. 74