README.md
1 Android LNotifications Sample Sample
2 ===================================
3
4 This sample demonstrates new features for notifications introduced in Android L.
5 These features include heads-up notifications, visibility, people, category and priority
6 metadata.
7
8 Introduction
9 ------------
10
11 Android 5.0 (Lollipop, API level 21) introduced additional features to the Notification API.
12 Specifically, it allows developers to specify the priority and visibility level for
13 notifications. This metadata allows the system to provide enhanced security for notifications
14 while the lock screen is active, allows high-priority notifications to appear even when
15 the notification bar is closed, and provides users to silence low-priority notifications
16 when they're busy.
17
18 This metadata is provided via additional arguments to the `Notification.Builder` class.
19
20 Specifically, this sample demonstrates how to generate a heads-up notification
21 (`HeadsUpNotificationFragment`), how to control visibility on the lock screen
22 (`VisibilityMetadataFragment`), and how to set the category, priority, and associated contact
23 for a notification (`OtherMetadataFragment`).
24
25 Pre-requisites
26 --------------
27
28 - Android SDK v21
29 - Android Build Tools v21.1.1
30 - Android Support Repository
31
32 Screenshots
33 -------------
34
35 <img src="screenshots/1-headsup.png" height="400" alt="Screenshot"/> <img src="screenshots/2-visibility.png" height="400" alt="Screenshot"/> <img src="screenshots/3-others.png" height="400" alt="Screenshot"/>
36
37 Getting Started
38 ---------------
39
40 This sample uses the Gradle build system. To build this project, use the
41 "gradlew build" command or use "Import Project" in Android Studio.
42
43 Support
44 -------
45
46 - Google+ Community: https://plus.google.com/communities/105153134372062985968
47 - Stack Overflow: http://stackoverflow.com/questions/tagged/android
48
49 If you've found an error in this sample, please file an issue:
50 https://github.com/googlesamples/android-LNotifications Sample
51
52 Patches are encouraged, and may be submitted by forking this project and
53 submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
54
55 License
56 -------
57
58 Copyright 2014 The Android Open Source Project, Inc.
59
60 Licensed to the Apache Software Foundation (ASF) under one or more contributor
61 license agreements. See the NOTICE file distributed with this work for
62 additional information regarding copyright ownership. The ASF licenses this
63 file to you under the Apache License, Version 2.0 (the "License"); you may not
64 use this file except in compliance with the License. You may obtain a copy of
65 the License at
66
67 http://www.apache.org/licenses/LICENSE-2.0
68
69 Unless required by applicable law or agreed to in writing, software
70 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
71 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
72 License for the specific language governing permissions and limitations under
73 the License.
74