• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
19
20<sample>
21    <name>Notifications</name>
22    <group>Wearable</group>
23    <package>com.example.android.support.wearable.notifications</package>
24
25    <minSdk>18</minSdk>
26    <targetSdkVersion>25</targetSdkVersion>
27    <targetSdkVersionWear>25</targetSdkVersionWear>
28
29    <wearable>
30        <has_handheld_app>true</has_handheld_app>
31    </wearable>
32
33    <dependency>com.android.support.constraint:constraint-layout:1.0.2</dependency>
34
35    <strings>
36        <intro>
37            <![CDATA[
38This sample application provides a showcase of available notification styles and
39demonstrates various features of the Android Wear notifications API. Running the sample on your
40companion allows you to select between various notification styles and to see how these
41notifications are displayed, both in a phone\'s notification shade and on the wearable.
42            ]]>
43        </intro>
44    </strings>
45
46    <template src="base"/>
47    <template src="Wear"/>
48    <metadata>
49        <status>PUBLISHED</status>
50        <categories>Wearable</categories>
51        <technologies>Android</technologies>
52        <languages>Java</languages>
53        <solutions>Mobile</solutions>
54        <level>INTERMEDIATE</level>
55        <icon>screenshots/ic_launcher.png</icon>
56        <screenshots>
57            <img>screenshots/companion-content-action.png</img>
58            <img>screenshots/content-action</img>
59            <img>screenshots/content-icon-menu</img>
60        </screenshots>
61        <api_refs>
62            <android>android.app.Notification</android>
63            <android>android.support.v4.app.NotificationCompat</android>
64            <android>android.support.v4.app.NotificationManagerCompat</android>
65            <android>android.support.v4.app.RemoteInput</android>
66            <android>android.support.wearable.view.WearableListView</android>
67        </api_refs>
68        <description>
69This sample showcases the available notification styles on a device and wearable.
70        </description>
71        <intro>
72This sample app enables the user to choose a notification type (the selection is done on the phone),
73which it then displays on the phone and wearable. The notification is built using
74[NotificationCompat.Builder][1] and [NotificationCompat.WearableExtender][2].
75
76See [Creating a Notification][3] for all the details on how to create a notification with wearable features.
77
78On the wearable side, the sample also shows how to create a custom layout using [WearableListView][4].
79
80[1]: http://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html
81[2]: https://developer.android.com/reference/android/support/v4/app/NotificationCompat.WearableExtender.html
82[3]: https://developer.android.com/training/wearables/notifications/creating.html
83[4]: https://developer.android.com/training/wearables/apps/layouts.html#UiLibrary
84        </intro>
85    </metadata>
86</sample>
87