1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 Copyright 2013 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 <sample> 19 <name>SpeedTracker</name> 20 <group>Wearable</group> 21 <package>com.example.android.wearable.speedtracker</package> 22 23 <minSdk>18</minSdk> 24 <targetSdkVersion>25</targetSdkVersion> 25 26 <minSdkVersionWear>23</minSdkVersionWear> 27 <compileSdkVersionWear>26</compileSdkVersionWear> 28 <targetSdkVersionWear>26</targetSdkVersionWear> 29 <multiDexEnabled>true</multiDexEnabled> 30 31 <wearable> 32 <has_handheld_app>true</has_handheld_app> 33 </wearable> 34 35 <dependency>com.android.support:design:25.3.1</dependency> 36 <dependency_wearable>com.android.support:wear:26.0.0</dependency_wearable> 37 38 <dependency>com.google.android.gms:play-services-maps</dependency> 39 <dependency>com.google.android.gms:play-services-location</dependency> 40 <dependency_wearable>com.google.android.gms:play-services-location</dependency_wearable> 41 42 <strings> 43 <intro> 44 <![CDATA[ 45 This sample uses the FusedLocation APIs of Google Play Services 46 to gather location and speed. The sample provides a simple screen that shows the 47 current speed of the device on the watch. User can set a speed 48 limit and if the speed approaches that limit, it changes the 49 color to yellow and if it exceeds the limit, it turns red. User 50 can also enable recording of coordinates and when it pairs back 51 with the phone, this data will be synced with the phone 52 component of the app and user can see a track made of those 53 coordinates on a map on the phone. 54 ]]> 55 </intro> 56 </strings> 57 58 <template src="base"/> 59 <template src="WearPlusShared"/> 60 61 <metadata> 62 <!-- Values: {DRAFT | PUBLISHED | INTERNAL | DEPRECATED | SUPERCEDED} --> 63 <status>PUBLISHED</status> 64 <!-- See http://go/sample-categories for details on the next 4 fields. --> 65 <!-- Most samples just need to udpate the Categories field. This is a comma- 66 seperated list of topic tags. Unlike the old category system, samples 67 may have multiple categories, so feel free to add extras. Try to avoid 68 simply tagging everything with "UI". :)--> 69 <categories>GPS, Wearable</categories> 70 <technologies>Android</technologies> 71 <languages>Java</languages> 72 <solutions>Mobile</solutions> 73 <!-- Values: {BEGINNER | INTERMEDIATE | ADVANCED | EXPERT} --> 74 <!-- Beginner is for "getting started" type content, or essential content. 75 (e.g. "Hello World", activities, intents) 76 77 Intermediate is for content that covers material a beginner doesn't need 78 to know, but that a skilled developer is expected to know. 79 (e.g. services, basic styles and theming, sync adapters) 80 81 Advanced is for highly technical content geared towards experienced developers. 82 (e.g. performance optimizations, custom views, bluetooth) 83 84 Expert is reserved for highly technical or specialized content, and should 85 be used sparingly. (e.g. VPN clients, SELinux, custom instrumentation runners) --> 86 <level>INTERMEDIATE</level> 87 <!-- Dimensions: 512x512, PNG fomrat --> 88 89 <!-- List of APIs that this sample should be cross-referenced under. Use <android> 90 for fully-qualified Framework class names ("android:" namespace). 91 92 Use <ext> for custom namespaces, if needed. See "Samples Index API" documentation 93 for more details. --> 94 <api_refs> 95 <android>com.google.android.gms.maps.MapFragment</android> 96 <android>com.google.android.gms.common.ConnectionResult</android> 97 <android>com.google.android.gms.common.api.GoogleApiClient</android> 98 <android>com.google.android.gms.common.api.ResultCallback</android> 99 <android>com.google.android.gms.common.api.Status</android> 100 <android>com.google.android.gms.location.LocationListener</android> 101 <android>com.google.android.gms.location.LocationRequest</android> 102 <android>com.google.android.gms.location.LocationServices</android> 103 <android>com.google.android.gms.wearable.DataApi</android> 104 <android>com.google.android.gms.wearable.PutDataMapRequest</android> 105 <android>com.google.android.gms.wearable.PutDataRequest</android> 106 <android>com.google.android.gms.wearable.Wearable</android> 107 </api_refs> 108 109 <!-- 1-3 line description of the sample here. 110 111 Avoid simply rearranging the sample's title. What does this sample actually 112 accomplish, and how does it do it? --> 113 <description> 114 Sample demonstrates recording location and speed with a Wear device in mind. Location is 115 retrieved via FusedLocatinProvider which retrieves coordinates from the phone or Wear 116 depending on whether the phone is disconnected or not and whether the Wear device has a 117 GPS chip. 118 </description> 119 120 <!-- Multi-paragraph introduction to sample, from an educational point-of-view. 121 Markdown formatting allowed. This will be used to generate a mini-article for the 122 sample on DAC. --> 123 <intro> 124 <![CDATA[ 125 126 Steps for trying out this sample: 127 * Compile and install the mobile app onto your mobile device or emulator. 128 * Compile and install the wearable app onto your Wear device or emulator. 129 (**Note:** wearable apps are not automatically pushed from your mobile device 130 unless you build a production release, see [here][1] for more info). 131 132 Sample demonstrates retrieving location and speed samples on Wear using the FusedLocationProvider. 133 It also passes GPS location information back to the mobile device via the Data Layer to be rendered 134 on a Map Fragment. 135 136 [1]: https://developer.android.com/training/wearables/apps/creating.html#Install 137 ]]> 138 </intro> 139 </metadata> 140 141 </sample> 142