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 <minSdkVersionWear>24</minSdkVersionWear> 27 <targetSdkVersion>25</targetSdkVersion> 28 <targetSdkVersionWear>25</targetSdkVersionWear> 29 30 <dependency>com.google.android.support:wearable:2.0.3</dependency> 31 <dependency_wearable>com.android.support:palette-v7:25.3.1</dependency_wearable> 32 33 <wearable> 34 <has_handheld_app>true</has_handheld_app> 35 </wearable> 36 37 <strings> 38 <intro> 39 <![CDATA[ 40 This sample demonstrates how to create watch faces for android wear and use complications with your 41 Wear 2.0 watch faces. 42 ]]> 43 </intro> 44 </strings> 45 46 <template src="base"/> 47 <template src="Wear"/> 48 49 <metadata> 50 <status>PUBLISHED</status> 51 <categories>Wearable</categories> 52 <technologies>Android</technologies> 53 <languages>Java</languages> 54 <solutions>Mobile</solutions> 55 <level>INTERMEDIATE</level> 56 <icon>screenshots/icon-web.png</icon> 57 <screenshots> 58 <img>screenshots/analog-face.png</img> 59 <img>screenshots/analog-watch-side-config-all.png</img> 60 <img>screenshots/analog-watch-side-config-1.png</img> 61 <img>screenshots/analog-watch-side-config-2.png</img> 62 <img>screenshots/digital-face.png</img> 63 <img>screenshots/digital-phone-side-config.png</img> 64 <img>screenshots/digital-watch-side-config.png</img> 65 <img>screenshots/interactive-face.png</img> 66 <img>screenshots/tilt-face.png</img> 67 </screenshots> 68 <api_refs> 69 <android>android.support.wearable.complications.ComplicationData</android> 70 <android>android.support.wearable.complications.ComplicationHelperActivity</android> 71 <android>android.support.wearable.complications.ComplicationProviderInfo</android> 72 <android>android.support.wearable.complications.ComplicationText</android> 73 <android>android.support.wearable.complications.ProviderChooserIntent</android> 74 <android>android.support.wearable.view.WearableRecyclerView</android> 75 <android>android.support.wearable.watchface.CanvasWatchFaceService</android> 76 <android>android.support.wearable.watchface.WatchFaceService</android> 77 <android>android.support.wearable.watchface.WatchFaceStyle</android> 78 </api_refs> 79 80 <!-- 1-3 line description of the sample here. 81 82 Avoid simply rearranging the sample's title. What does this sample actually 83 accomplish, and how does it do it? --> 84 <description> 85 A simple sample that demonstrates watch faces and complications for Wear 2.0. 86 </description> 87 88 <intro> 89 <![CDATA[ 90 This sample demonstrates how to create watch faces for Android Wear. 91 92 The analog watch face covers best practices for Wear 2.0 including complications and a new 93 configuration Activity for configuring both the watch face styles and the complications themselves. 94 We recommend you reuse the configuration code and follow the UX patterns in your watch face's 95 configuration activity. You can see a preview in the screenshots section of the README. 96 97 The analog watch face has three main classes: 98 99 - AnalogComplicationWatchFaceService.java (watchface folder) - Renders the watch face and active 100 complications. 101 102 - AnalogComplicationConfigActivity.java (config folder) - Allows user to adjust watch face settings 103 (arm and background colors) and watch face complications. 104 105 - AnalogComplicationConfigData.java (models folder) - Populates the configuration screen in the 106 previous step by returning a list of items. Each item represents something you can customize on the 107 watch face. Items include a preview of the watch face (where you can pick your complications), 108 marker color, background color, unread notifications, and background image complication. You can 109 extend this and add your own. 110 111 112 We include several older watch faces to show best practices for Wear 1.0. If you are targeting 113 older devices, you may want to review those watch faces (digital, opengl, and interactive). 114 115 The digital watch face includes a watch-side and phone-side configuration example. 116 117 This sample includes both a phone app and a wearable app. 118 119 Because watch face apps do not have a default Activity in their project, you will need to set your 120 Configurations to "Do not launch Activity" for both the Wear and Application modules. If you are 121 unsure how to do this, please review the "Run Starter project" section in the 122 [Google Watch Face Code Lab][1]. 123 124 [1]: https://codelabs.developers.google.com/codelabs/watchface/index.html 125 ]]> 126 </intro> 127 </metadata> 128 129 </sample> 130