1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 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<manifest package="com.example.android.wearable.watchface"
18          xmlns:android="http://schemas.android.com/apk/res/android">
19
20    <uses-sdk
21        android:minSdkVersion="21"
22        android:targetSdkVersion="25"/>
23
24    <uses-feature android:name="android.hardware.type.watch"/>
25
26    <!-- Required to act as a custom watch face. -->
27    <uses-permission android:name="android.permission.WAKE_LOCK"/>
28
29    <!-- Required for complications to receive complication data and open the provider chooser. -->
30    <uses-permission android:name="com.google.android.wearable.permission.RECEIVE_COMPLICATION_DATA"/>
31
32    <!-- Calendar permission used by CalendarWatchFaceService -->
33    <uses-permission android:name="android.permission.READ_CALENDAR"/>
34
35    <!-- Location permission used by FitDistanceWatchFaceService -->
36    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
37
38    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
39    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
40    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
41
42    <application
43        android:allowBackup="true"
44        android:icon="@drawable/ic_launcher"
45        android:label="@string/app_name">
46
47        <meta-data
48            android:name="com.google.android.wearable.standalone"
49            android:value="true" />
50
51        <meta-data
52            android:name="com.google.android.gms.version"
53            android:value="@integer/google_play_services_version"/>
54
55        <uses-library
56            android:name="com.google.android.wearable"
57            android:required="false"/>
58
59        <service
60            android:name=".AnalogWatchFaceService"
61            android:label="@string/analog_name"
62            android:permission="android.permission.BIND_WALLPAPER">
63            <meta-data
64                android:name="android.service.wallpaper"
65                android:resource="@xml/watch_face"/>
66            <meta-data
67                android:name="com.google.android.wearable.watchface.preview"
68                android:resource="@drawable/preview_analog"/>
69            <meta-data
70                android:name="com.google.android.wearable.watchface.preview_circular"
71                android:resource="@drawable/preview_analog_circular"/>
72            <meta-data
73                android:name="com.google.android.wearable.watchface.companionConfigurationAction"
74                android:value="com.example.android.wearable.watchface.CONFIG_ANALOG"/>
75
76            <intent-filter>
77                <action android:name="android.service.wallpaper.WallpaperService"/>
78
79                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
80            </intent-filter>
81        </service>
82        <service
83            android:name=".SweepWatchFaceService"
84            android:label="@string/sweep_name"
85            android:permission="android.permission.BIND_WALLPAPER">
86            <meta-data
87                android:name="android.service.wallpaper"
88                android:resource="@xml/watch_face"/>
89            <meta-data
90                android:name="com.google.android.wearable.watchface.preview"
91                android:resource="@drawable/preview_analog"/>
92            <meta-data
93                android:name="com.google.android.wearable.watchface.preview_circular"
94                android:resource="@drawable/preview_analog_circular"/>
95
96            <intent-filter>
97                <action android:name="android.service.wallpaper.WallpaperService"/>
98
99                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
100            </intent-filter>
101        </service>
102        <service
103            android:name=".OpenGLWatchFaceService"
104            android:label="@string/opengl_name"
105            android:permission="android.permission.BIND_WALLPAPER">
106            <meta-data
107                android:name="android.service.wallpaper"
108                android:resource="@xml/watch_face"/>
109            <meta-data
110                android:name="com.google.android.wearable.watchface.preview"
111                android:resource="@drawable/preview_opengl"/>
112            <meta-data
113                android:name="com.google.android.wearable.watchface.preview_circular"
114                android:resource="@drawable/preview_opengl_circular"/>
115            <meta-data
116                android:name="com.google.android.wearable.watchface.companionConfigurationAction"
117                android:value="com.example.android.wearable.watchface.CONFIG_OPENGL"/>
118
119            <intent-filter>
120                <action android:name="android.service.wallpaper.WallpaperService"/>
121
122                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
123            </intent-filter>
124        </service>
125        <service
126            android:name=".CardBoundsWatchFaceService"
127            android:label="@string/card_bounds_name"
128            android:permission="android.permission.BIND_WALLPAPER">
129            <meta-data
130                android:name="android.service.wallpaper"
131                android:resource="@xml/watch_face"/>
132            <meta-data
133                android:name="com.google.android.wearable.watchface.preview"
134                android:resource="@drawable/preview_card_bounds"/>
135            <meta-data
136                android:name="com.google.android.wearable.watchface.preview_circular"
137                android:resource="@drawable/preview_card_bounds_circular"/>
138            <meta-data
139                android:name="com.google.android.wearable.watchface.companionConfigurationAction"
140                android:value="com.example.android.wearable.watchface.CONFIG_CARD_BOUNDS"/>
141
142            <intent-filter>
143                <action android:name="android.service.wallpaper.WallpaperService"/>
144
145                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
146            </intent-filter>
147        </service>
148        <service
149            android:name=".ComplicationSimpleWatchFaceService"
150            android:enabled="true"
151            android:label="@string/complication_simple"
152            android:permission="android.permission.BIND_WALLPAPER">
153            <meta-data
154                android:name="android.service.wallpaper"
155                android:resource="@xml/watch_face"/>
156            <meta-data
157                android:name="com.google.android.wearable.watchface.preview"
158                android:resource="@drawable/preview_complication_simple"/>
159            <meta-data
160                android:name="com.google.android.wearable.watchface.preview_circular"
161                android:resource="@drawable/preview_complication_simple"/>
162            <meta-data
163                android:name="com.google.android.wearable.watchface.wearableConfigurationAction"
164                android:value="com.example.android.wearable.watchface.CONFIG_COMPLICATION_SIMPLE"/>
165
166            <intent-filter>
167                <action android:name="android.service.wallpaper.WallpaperService"/>
168
169                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
170            </intent-filter>
171        </service>
172
173        <activity android:name="android.support.wearable.complications.ComplicationHelperActivity"/>
174        <activity
175            android:name=".ComplicationSimpleConfigActivity"
176            android:label="@string/complication_simple">
177            <intent-filter>
178                <action android:name="com.example.android.wearable.watchface.CONFIG_COMPLICATION_SIMPLE"/>
179
180                <category android:name="com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION"/>
181                <category android:name="android.intent.category.DEFAULT"/>
182            </intent-filter>
183        </activity>
184
185        <service
186            android:name=".InteractiveWatchFaceService"
187            android:label="@string/interactive_name"
188            android:permission="android.permission.BIND_WALLPAPER">
189            <meta-data
190                android:name="android.service.wallpaper"
191                android:resource="@xml/watch_face"/>
192            <meta-data
193                android:name="com.google.android.wearable.watchface.preview"
194                android:resource="@drawable/preview_interactive"/>
195            <meta-data
196                android:name="com.google.android.wearable.watchface.preview_circular"
197                android:resource="@drawable/preview_interactive_circular"/>
198
199            <intent-filter>
200                <action android:name="android.service.wallpaper.WallpaperService"/>
201
202                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
203            </intent-filter>
204        </service>
205        <service
206            android:name=".DigitalWatchFaceService"
207            android:label="@string/digital_name"
208            android:permission="android.permission.BIND_WALLPAPER">
209            <meta-data
210                android:name="android.service.wallpaper"
211                android:resource="@xml/watch_face"/>
212            <meta-data
213                android:name="com.google.android.wearable.watchface.preview"
214                android:resource="@drawable/preview_digital"/>
215            <meta-data
216                android:name="com.google.android.wearable.watchface.preview_circular"
217                android:resource="@drawable/preview_digital_circular"/>
218            <meta-data
219                android:name="com.google.android.wearable.watchface.companionConfigurationAction"
220                android:value="com.example.android.wearable.watchface.CONFIG_DIGITAL"/>
221            <meta-data
222                android:name="com.google.android.wearable.watchface.wearableConfigurationAction"
223                android:value="com.example.android.wearable.watchface.CONFIG_DIGITAL"/>
224
225            <intent-filter>
226                <action android:name="android.service.wallpaper.WallpaperService"/>
227
228                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
229            </intent-filter>
230        </service>
231
232        <!--
233             All intent-filters for config actions must include the categories
234            com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION
235            and android.intent.category.DEFAULT.
236        -->
237
238        <activity
239            android:name=".DigitalWatchFaceWearableConfigActivity"
240            android:label="@string/digital_config_name">
241            <intent-filter>
242                <action android:name="com.example.android.wearable.watchface.CONFIG_DIGITAL"/>
243
244                <category android:name="com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION"/>
245                <category android:name="android.intent.category.DEFAULT"/>
246            </intent-filter>
247        </activity>
248
249        <service
250            android:name=".CalendarWatchFaceService"
251            android:label="@string/calendar_name"
252            android:permission="android.permission.BIND_WALLPAPER">
253            <meta-data
254                android:name="android.service.wallpaper"
255                android:resource="@xml/watch_face"/>
256            <meta-data
257                android:name="com.google.android.wearable.watchface.preview"
258                android:resource="@drawable/preview_calendar"/>
259            <meta-data
260                android:name="com.google.android.wearable.watchface.preview_circular"
261                android:resource="@drawable/preview_calendar_circular"/>
262
263            <intent-filter>
264                <action android:name="android.service.wallpaper.WallpaperService"/>
265
266                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
267            </intent-filter>
268        </service>
269        <service android:name=".DigitalWatchFaceConfigListenerService">
270            <intent-filter>
271                <action android:name="com.google.android.gms.wearable.MESSAGE_RECEIVED"/>
272
273                <data
274                    android:host="*"
275                    android:pathPrefix="/"
276                    android:scheme="wear"/>
277            </intent-filter>
278        </service>
279        <service
280            android:name=".FitDistanceWatchFaceService"
281            android:label="@string/fit_distance_name"
282            android:permission="android.permission.BIND_WALLPAPER">
283            <meta-data
284                android:name="android.service.wallpaper"
285                android:resource="@xml/watch_face"/>
286            <meta-data
287                android:name="com.google.android.wearable.watchface.preview"
288                android:resource="@drawable/preview_distance"/>
289            <meta-data
290                android:name="com.google.android.wearable.watchface.preview_circular"
291                android:resource="@drawable/preview_distance_circular"/>
292            <meta-data
293                android:name="com.google.android.wearable.watchface.companionConfigurationAction"
294                android:value="com.example.android.wearable.watchface.CONFIG_FIT_DISTANCE"/>
295
296            <intent-filter>
297                <action android:name="android.service.wallpaper.WallpaperService"/>
298
299                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
300            </intent-filter>
301        </service>
302        <service
303            android:name=".FitStepsWatchFaceService"
304            android:label="@string/fit_steps_name"
305            android:permission="android.permission.BIND_WALLPAPER">
306            <meta-data
307                android:name="android.service.wallpaper"
308                android:resource="@xml/watch_face"/>
309            <meta-data
310                android:name="com.google.android.wearable.watchface.preview"
311                android:resource="@drawable/preview_fit"/>
312            <meta-data
313                android:name="com.google.android.wearable.watchface.preview_circular"
314                android:resource="@drawable/preview_fit_circular"/>
315
316            <intent-filter>
317                <action android:name="android.service.wallpaper.WallpaperService"/>
318
319                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
320            </intent-filter>
321        </service>
322
323        <activity
324            android:name=".CalendarWatchFacePermissionActivity"
325            android:label="@string/title_activity_calendar_watch_face_permission">
326        </activity>
327
328        <service
329            android:name=".provider.RandomNumberProviderService"
330            android:icon="@drawable/ic_launcher"
331            android:label="@string/complications_provider_random_number"
332            android:permission="com.google.android.wearable.permission.BIND_COMPLICATION_PROVIDER">
333            <intent-filter>
334                <action android:name="android.support.wearable.complications.ACTION_COMPLICATION_UPDATE_REQUEST"/>
335            </intent-filter>
336
337            <meta-data
338                android:name="android.support.wearable.complications.SUPPORTED_TYPES"
339                android:value="RANGED_VALUE,SHORT_TEXT,LONG_TEXT"/>
340            <!--
341            When your complication data provider is active, UPDATE_PERIOD_SECONDS specifies how
342            often you want the system to check for updates to the data. In this case, the time is
343            specified to 600 seconds (10 minutes).
344
345            In general, you want to set this value high and manually trigger updates only when your
346            complication data actually changes via ProviderUpdateRequester (check
347            UpdateComplicationDataService.java for an example).
348
349            In everyday use, developers should consider intervals in the order of minutes.
350            Also, remember that this is only a guidance for the system. Android Wear may update less
351            frequently.
352            -->
353            <meta-data
354                android:name="android.support.wearable.complications.UPDATE_PERIOD_SECONDS"
355                android:value="600"/>
356        </service>
357        <service
358            android:name=".provider.UpdateComplicationDataService"
359            android:exported="false">
360        </service>
361    </application>
362
363</manifest>