1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2017 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-feature android:name="android.hardware.type.watch"/>
21
22    <!-- Required to act as a custom watch face. -->
23    <uses-permission android:name="android.permission.WAKE_LOCK"/>
24
25    <!-- Required for complications to receive complication data and open the provider chooser. -->
26    <uses-permission android:name="com.google.android.wearable.permission.RECEIVE_COMPLICATION_DATA"/>
27
28    <application
29        android:allowBackup="true"
30        android:icon="@drawable/ic_launcher"
31        android:label="@string/app_name">
32        <meta-data
33            android:name="com.google.android.wearable.standalone"
34            android:value="true"/>
35        <meta-data
36            android:name="com.google.android.gms.version"
37            android:value="@integer/google_play_services_version"/>
38
39        <uses-library
40            android:name="com.google.android.wearable"
41            android:required="false"/>
42
43        <service
44            android:name=".watchface.OpenGLWatchFaceService"
45            android:label="@string/opengl_name"
46            android:permission="android.permission.BIND_WALLPAPER">
47            <meta-data
48                android:name="android.service.wallpaper"
49                android:resource="@xml/watch_face"/>
50            <meta-data
51                android:name="com.google.android.wearable.watchface.preview"
52                android:resource="@drawable/preview_opengl"/>
53            <meta-data
54                android:name="com.google.android.wearable.watchface.preview_circular"
55                android:resource="@drawable/preview_opengl_circular"/>
56            <meta-data
57                android:name="com.google.android.wearable.watchface.companionConfigurationAction"
58                android:value="com.example.android.wearable.watchface.CONFIG_OPENGL"/>
59
60            <intent-filter>
61                <action android:name="android.service.wallpaper.WallpaperService"/>
62
63                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
64            </intent-filter>
65        </service>
66        <service
67            android:name=".watchface.AnalogComplicationWatchFaceService"
68            android:enabled="true"
69            android:label="@string/analog_complication"
70            android:permission="android.permission.BIND_WALLPAPER">
71            <meta-data
72                android:name="android.service.wallpaper"
73                android:resource="@xml/watch_face"/>
74            <meta-data
75                android:name="com.google.android.wearable.watchface.preview"
76                android:resource="@drawable/preview_analog_complication"/>
77            <meta-data
78                android:name="com.google.android.wearable.watchface.preview_circular"
79                android:resource="@drawable/preview_analog_complication_circular"/>
80            <meta-data
81                android:name="com.google.android.wearable.watchface.wearableConfigurationAction"
82                android:value="com.example.android.wearable.watchface.CONFIG_COMPLICATION_SIMPLE"/>
83
84            <intent-filter>
85                <action android:name="android.service.wallpaper.WallpaperService"/>
86
87                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
88            </intent-filter>
89        </service>
90
91        <activity android:name="android.support.wearable.complications.ComplicationHelperActivity"/>
92        <activity
93            android:name=".config.AnalogComplicationConfigActivity"
94            android:label="@string/analog_complication_config">
95            <intent-filter>
96                <action android:name="com.example.android.wearable.watchface.CONFIG_COMPLICATION_SIMPLE"/>
97
98                <category android:name="com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION"/>
99                <category android:name="android.intent.category.DEFAULT"/>
100            </intent-filter>
101        </activity>
102
103        <service
104            android:name=".watchface.InteractiveWatchFaceService"
105            android:label="@string/interactive_name"
106            android:permission="android.permission.BIND_WALLPAPER">
107            <meta-data
108                android:name="android.service.wallpaper"
109                android:resource="@xml/watch_face"/>
110            <meta-data
111                android:name="com.google.android.wearable.watchface.preview"
112                android:resource="@drawable/preview_interactive"/>
113            <meta-data
114                android:name="com.google.android.wearable.watchface.preview_circular"
115                android:resource="@drawable/preview_interactive_circular"/>
116
117            <intent-filter>
118                <action android:name="android.service.wallpaper.WallpaperService"/>
119
120                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
121            </intent-filter>
122        </service>
123
124        <service
125            android:name=".watchface.DigitalWatchFaceService"
126            android:label="@string/digital_name"
127            android:permission="android.permission.BIND_WALLPAPER">
128            <meta-data
129                android:name="android.service.wallpaper"
130                android:resource="@xml/watch_face"/>
131            <meta-data
132                android:name="com.google.android.wearable.watchface.preview"
133                android:resource="@drawable/preview_digital"/>
134            <meta-data
135                android:name="com.google.android.wearable.watchface.preview_circular"
136                android:resource="@drawable/preview_digital_circular"/>
137            <meta-data
138                android:name="com.google.android.wearable.watchface.companionConfigurationAction"
139                android:value="com.example.android.wearable.watchface.CONFIG_DIGITAL"/>
140            <meta-data
141                android:name="com.google.android.wearable.watchface.wearableConfigurationAction"
142                android:value="com.example.android.wearable.watchface.CONFIG_DIGITAL"/>
143
144            <intent-filter>
145                <action android:name="android.service.wallpaper.WallpaperService"/>
146
147                <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE"/>
148            </intent-filter>
149        </service>
150
151        <!--
152             All intent-filters for config actions must include the categories
153            com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION
154            and android.intent.category.DEFAULT.
155        -->
156
157        <activity
158            android:name=".config.DigitalWatchFaceWearableConfigActivity"
159            android:label="@string/digital_config_name">
160            <intent-filter>
161                <action android:name="com.example.android.wearable.watchface.CONFIG_DIGITAL"/>
162
163                <category android:name="com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION"/>
164                <category android:name="android.intent.category.DEFAULT"/>
165            </intent-filter>
166        </activity>
167
168        <service android:name=".config.DigitalWatchFaceConfigListenerService">
169            <intent-filter>
170                <action android:name="com.google.android.gms.wearable.MESSAGE_RECEIVED"/>
171
172                <data
173                    android:host="*"
174                    android:pathPrefix="/"
175                    android:scheme="wear"/>
176            </intent-filter>
177        </service>
178
179        <service
180            android:name=".provider.IncrementingNumberComplicationProviderService"
181            android:icon="@drawable/icn_complications"
182            android:label="@string/complications_provider_incrementing_number"
183            android:permission="com.google.android.wearable.permission.BIND_COMPLICATION_PROVIDER">
184            <intent-filter>
185                <action android:name="android.support.wearable.complications.ACTION_COMPLICATION_UPDATE_REQUEST"/>
186            </intent-filter>
187
188            <meta-data
189                android:name="android.support.wearable.complications.SUPPORTED_TYPES"
190                android:value="RANGED_VALUE,SHORT_TEXT,LONG_TEXT"/>
191            <!--
192            When your complication data provider is active, UPDATE_PERIOD_SECONDS specifies how
193            often you want the system to check for updates to the data.
194
195            In general, you want to manually trigger updates only when your complication data
196            actually changes via ProviderUpdateRequester (check UpdateComplicationDataService.java
197            for an example).
198
199            If you do decide to use UPDATE_PERIOD_SECONDS, set the interval in the order of minutes.
200            A good value might be 600 seconds (10 minutes) if you need updates pulled often.
201
202            Also, remember that this is only a guidance for the system. Wear may update less
203            frequently.
204            -->
205            <meta-data
206                android:name="android.support.wearable.complications.UPDATE_PERIOD_SECONDS"
207                android:value="0"/>
208        </service>
209        <receiver android:name=".provider.ComplicationToggleReceiver"/>
210
211        <activity android:name=".config.ColorSelectionActivity"/>
212    </application>
213</manifest>