Home | History | Annotate | Download | only in LNotifications
      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 <sample>
     19     <name>LNotifications Sample</name>
     20     <group>Notification</group>
     21     <package>com.example.android.lnotifications</package>
     22 
     23     <!-- change minSdk if needed-->
     24     <minSdk>21</minSdk>
     25 
     26     <strings>
     27         <intro>
     28             <![CDATA[
     29                 This sample demonstrates how new features for notifications introduced in Android L
     30                 are used such as Heads-Up notifications, visibility, people, category and priority
     31                 metadata. (Priority metadata has been present since Jelly Bean, but actually unused).
     32             ]]>
     33         </intro>
     34     </strings>
     35 
     36     <template src="base"/>
     37 
     38     <metadata>
     39         <status>PUBLISHED</status>
     40         <categories>Notification</categories>
     41         <technologies>Android</technologies>
     42         <languages>Java</languages>
     43         <solutions>Mobile</solutions>
     44         <level>INTERMEDIATE</level>
     45         <icon>screenshots/icon-web.png</icon>
     46         <screenshots>
     47             <img>screenshots/1-headsup.png</img>
     48             <img>screenshots/2-visibility.png</img>
     49             <img>screenshots/3-others.png</img>
     50         </screenshots>
     51         <api_refs>
     52             <android>android.app.Notification</android>
     53             <android>android.app.Notification.Builder</android>
     54             <android>android.app.NotificationManager</android>
     55         </api_refs>
     56 
     57         <description>
     58 <![CDATA[
     59 This sample demonstrates new features for notifications introduced in Android L.
     60 These features include heads-up notifications, visibility, people, category and priority
     61 metadata.
     62 ]]>
     63         </description>
     64 
     65         <intro>
     66 <![CDATA[
     67 Android 5.0 (Lollipop, API level 21) introduced additional features to the Notification API.
     68 Specifically, it allows developers to specify the priority and visibility level for
     69 notifications. This metadata allows the system to provide enhanced security for notifications
     70 while the lock screen is active, allows high-priority notifications to appear even when
     71 the notification bar is closed, and provides users to silence low-priority notifications
     72 when they're busy.
     73 
     74 This metadata is provided via additional arguments to the `Notification.Builder` class.
     75 
     76 Specifically, this sample demonstrates how to generate a heads-up notification
     77 (`HeadsUpNotificationFragment`), how to control visibility on the lock screen
     78 (`VisibilityMetadataFragment`), and how to set the category, priority, and associated contact
     79 for a notification (`OtherMetadataFragment`).
     80 ]]>
     81         </intro>
     82     </metadata>
     83 </sample>
     84