1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 Copyright 2014 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16 --> 17 18 19 20 <sample> 21 <name>WatchFace</name> 22 <group>Wearable</group> 23 <package>com.example.android.wearable.watchface</package> 24 25 <minSdk>18</minSdk> 26 <targetSdkVersion>25</targetSdkVersion> 27 28 <minSdkVersionWear>24</minSdkVersionWear> 29 <compileSdkVersionWear>26</compileSdkVersionWear> 30 <targetSdkVersionWear>26</targetSdkVersionWear> 31 32 <dependency>com.google.android.support:wearable:2.0.3</dependency> 33 <dependency_wearable>com.android.support:palette-v7:26.0.0</dependency_wearable> 34 <dependency_wearable>com.android.support:wear:26.0.0</dependency_wearable> 35 36 37 <wearable> 38 <has_handheld_app>true</has_handheld_app> 39 </wearable> 40 41 <strings> 42 <intro> 43 <![CDATA[ 44 This sample demonstrates how to create watch faces for android wear and use complications with your 45 Wear 2.0 watch faces. 46 ]]> 47 </intro> 48 </strings> 49 50 <template src="base"/> 51 <template src="Wear"/> 52 53 <metadata> 54 <status>PUBLISHED</status> 55 <categories>Wearable</categories> 56 <technologies>Android</technologies> 57 <languages>Java</languages> 58 <solutions>Mobile</solutions> 59 <level>INTERMEDIATE</level> 60 <icon>screenshots/icon-web.png</icon> 61 <screenshots> 62 <img>screenshots/analog-face.png</img> 63 <img>screenshots/analog-watch-side-config-all.png</img> 64 <img>screenshots/analog-watch-side-config-1.png</img> 65 <img>screenshots/analog-watch-side-config-2.png</img> 66 <img>screenshots/digital-face.png</img> 67 <img>screenshots/digital-phone-side-config.png</img> 68 <img>screenshots/digital-watch-side-config.png</img> 69 <img>screenshots/interactive-face.png</img> 70 <img>screenshots/tilt-face.png</img> 71 </screenshots> 72 <api_refs> 73 <android>android.support.wearable.complications.ComplicationData</android> 74 <android>android.support.wearable.complications.ComplicationHelperActivity</android> 75 <android>android.support.wearable.complications.ComplicationProviderInfo</android> 76 <android>android.support.wearable.complications.ComplicationText</android> 77 <android>android.support.wearable.complications.ProviderChooserIntent</android> 78 <android>android.support.wearable.view.WearableRecyclerView</android> 79 <android>android.support.wearable.watchface.CanvasWatchFaceService</android> 80 <android>android.support.wearable.watchface.WatchFaceService</android> 81 <android>android.support.wearable.watchface.WatchFaceStyle</android> 82 </api_refs> 83 84 <!-- 1-3 line description of the sample here. 85 86 Avoid simply rearranging the sample's title. What does this sample actually 87 accomplish, and how does it do it? --> 88 <description> 89 A simple sample that demonstrates watch faces and complications for Wear 2.0. 90 </description> 91 92 <intro> 93 <![CDATA[ 94 This sample demonstrates how to create watch faces for Android Wear. 95 96 The analog watch face covers best practices for Wear 2.0 including complications and a new 97 configuration Activity for configuring both the watch face styles and the complications themselves. 98 We recommend you reuse the configuration code and follow the UX patterns in your watch face's 99 configuration activity. You can see a preview in the screenshots section of the README. 100 101 The analog watch face has three main classes: 102 103 - AnalogComplicationWatchFaceService.java (watchface folder) - Renders the watch face and active 104 complications. 105 106 - AnalogComplicationConfigActivity.java (config folder) - Allows user to adjust watch face settings 107 (arm and background colors) and watch face complications. 108 109 - AnalogComplicationConfigData.java (models folder) - Populates the configuration screen in the 110 previous step by returning a list of items. Each item represents something you can customize on the 111 watch face. Items include a preview of the watch face (where you can pick your complications), 112 marker color, background color, unread notifications, and background image complication. You can 113 extend this and add your own. 114 115 116 We include several older watch faces to show best practices for Wear 1.0. If you are targeting 117 older devices, you may want to review those watch faces (digital, opengl, and interactive). 118 119 The digital watch face includes a watch-side and phone-side configuration example. 120 121 This sample includes both a phone app and a wearable app. 122 123 Because watch face apps do not have a default Activity in their project, you will need to set your 124 Configurations to "Do not launch Activity" for both the Wear and Application modules. If you are 125 unsure how to do this, please review the "Run Starter project" section in the 126 [Google Watch Face Code Lab][1]. 127 128 [1]: https://codelabs.developers.google.com/codelabs/watchface/index.html 129 ]]> 130 </intro> 131 </metadata> 132 133 </sample> 134