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