blob: 1544d9c92a8b540429707b298c254bf05ea5cffb [file] [log] [blame]
Joe Fernandez306f1ce2015-05-01 12:51:21 -07001page.title=Samples
Trevor Johns682c24e2016-04-12 10:13:47 -07002page.tags="preview", "samples", "android"
3page.image=images/cards/card-n-samples_2x.png
Joe Fernandez306f1ce2015-05-01 12:51:21 -07004@jd:body
5
6<p>
Trevor Johns682c24e2016-04-12 10:13:47 -07007 The following code samples are provided for Android N. To
8 download the samples in Android Studio, select the <b>File &gt; Import
9 Samples</b> menu option.
Joe Fernandez306f1ce2015-05-01 12:51:21 -070010</p>
11
12<p class="note">
13 <strong>Note:</strong> These downloadable projects are designed
14 for use with Gradle and Android Studio.
15</p>
16
17
Trevor Johns682c24e2016-04-12 10:13:47 -070018<h3 id="mw">Multi-Window Playground</h3>
19<img src="{@docRoot}preview/images/sample-multiwindow.png" style="float: left; padding-right: 0.5em" height="250" width="156"/>
Joe Fernandez306f1ce2015-05-01 12:51:21 -070020<p>
Trevor Johns682c24e2016-04-12 10:13:47 -070021 This sample demonstrates how to take advantage of multiple window
22 user interfaces with your app.
23</p>
24<p>
25 <a href="https://github.com/googlesamples/android-MultiWindowPlayground">
26 Get it on GitHub</a>
Joe Fernandez306f1ce2015-05-01 12:51:21 -070027</p>
28
Trevor Johns682c24e2016-04-12 10:13:47 -070029<div style="clear: both;"></div>
30<h3 id="an">Active Notifications</h3>
31<img src="{@docRoot}preview/images/sample-activenotifications.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
Joe Fernandez306f1ce2015-05-01 12:51:21 -070032<p>
Trevor Johns682c24e2016-04-12 10:13:47 -070033 This is a pre-existing sample which shows a simple service that sends
34 notifications using NotificationCompat. Each unread conversation from a user
35 is sent as a distinct notification.
36</p>
37<p>
38 This sample has been updated to take advantage of new notification features
39 available in Android N.
40</p>
41<p>
42 <a href="https://github.com/googlesamples/android-ActiveNotifications">
43 Get it on GitHub</a>
Joe Fernandez306f1ce2015-05-01 12:51:21 -070044</p>
45
Trevor Johns682c24e2016-04-12 10:13:47 -070046<div style="clear: both;"></div>
47<h3 id="ms">Messaging Service</h3>
48<img src="{@docRoot}preview/images/sample-messagingservice.png" style="float: left; padding-right: 0.5em" height="250" width="150" />
Luan Nguyen98ebcef2015-05-12 13:21:34 -070049<p>
Trevor Johns682c24e2016-04-12 10:13:47 -070050 This is a pre-existing sample which demonstrates how to use
51 NotificationManager to tell how many notifications an application is currently
52 showing.
53</p>
54<p>
55 This sample has been updated to take advantage of new notification features
56 available in Android N.
57</p>
58<p>
59 <a href="https://github.com/googlesamples/android-MessagingService">
60 Get it on GitHub</a>
Luan Nguyen98ebcef2015-05-12 13:21:34 -070061</p>
62
Trevor Johns682c24e2016-04-12 10:13:47 -070063<div style="clear: both;"></div>
64<h3 id="fbe">Direct Boot</h3>
65<img src="{@docRoot}preview/images/sample-directboot.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
Luan Nguyen98ebcef2015-05-12 13:21:34 -070066<p>
Trevor Johns682c24e2016-04-12 10:13:47 -070067 This sample demonstrates how to store and access data in a device encrypted
68 storage which is always available while the device is booted.
69</p>
70<p>
71 <a href="https://github.com/googlesamples/android-DirectBoot">
72 Get it on GitHub</a>
Luan Nguyen98ebcef2015-05-12 13:21:34 -070073</p>
74
Trevor Johns682c24e2016-04-12 10:13:47 -070075<div style="clear: both;"></div>
76<h3 id="sda">Scoped Directory Access</h3>
77<img src="{@docRoot}preview/images/sample-scopeddirectoryaccess.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
Joe Fernandeza06ac3a2015-05-15 15:42:17 -070078<p>
Trevor Johns682c24e2016-04-12 10:13:47 -070079 This sample demonstrates how to read and write data from specific
80 directories, while requiring fewer permissions.
Joe Fernandeza06ac3a2015-05-15 15:42:17 -070081</p>
Joe Fernandeza06ac3a2015-05-15 15:42:17 -070082<p>
Trevor Johns682c24e2016-04-12 10:13:47 -070083 <a href="https://github.com/googlesamples/android-ScopedDirectoryAccess">
84 Get it on GitHub</a>
85</p>