blob: b18b9270e7687568a13758161d3231a17ef280bd [file] [log] [blame]
Trevor Johnsa6b46362013-10-30 16:38:01 -07001<?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<sample>
18 <name>CustomNotifications</name>
Renato Manginiebeca0e2014-11-11 17:55:39 -080019 <group>Notification</group>
Trevor Johnsa6b46362013-10-30 16:38:01 -070020 <package>com.example.android.customnotifications</package>
21
22 <!-- change minSdk if needed-->
23 <minSdk>4</minSdk>
24
25 <strings>
26 <intro>
27 <![CDATA[
28 This sample demonstrates notifications with custom content views.
29 ]]>
30 </intro>
31 </strings>
32
Arthur Thompson13e97e42014-11-26 17:35:19 -080033 <metadata>
34 <status>PUBLISHED</status>
35 <categories>Notification, UI</categories>
36 <technologies>Android</technologies>
37 <languages>Java</languages>
38 <solutions>Mobile</solutions>
39 <level>BEGINNER</level>
40 <icon>screenshots/icon-web.png</icon>
41 <screenshots>
42 <img>screenshots/main-notification.png</img>
43 <img>screenshots/notification.png</img>
44 </screenshots>
45 <api_refs>
46 <android>android.app.Notification</android>
47 <android>android.app.NotificationManager</android>
48 <android>android.app.PendingIntent</android>
49 <android>android.support.v4.app.NotificationCompat</android>
50 <android>android.widget.RemoteViews</android>
51 </api_refs>
52 <description>
53<![CDATA[
54This sample demonstrates notifications with custom content views.
55The use of collapsed and expanded notification views are shown.
56]]>
57 </description>
58 <intro>
59<![CDATA[
60This sample demonstrates notifications with custom content views. It
61also demonstrates the expanded notification introduced in API level 16.
62
63This sample shows all the required steps to create and display custom
64notifications:
65
66- Create Intent to launch Activity when notification is clicked.
67- Define custom layouts for collapsed and expanded views.
68- Use NotificationManager's notify to show notification.
69
70In the sample, click on the "SHOW NOTIFICATION" button to create
71a notification. Use two-fingered gestures up and down to collapse
72and expand the notification.
73]]>
74 </intro>
75 </metadata>
76
Trevor Johnsa6b46362013-10-30 16:38:01 -070077 <template src="base"/>
78
79</sample>