blob: 1544d9c92a8b540429707b298c254bf05ea5cffb [file] [log] [blame]
Dirk Dougherty5748bc42016-02-06 18:24:32 -08001page.title=Samples
Joe Fernandez561db662016-03-03 19:02:17 -08002page.tags="preview", "samples", "android"
Dirk Doughertya6495a922016-03-04 15:21:59 -08003page.image=images/cards/card-n-samples_2x.png
Dirk Dougherty5748bc42016-02-06 18:24:32 -08004@jd:body
5
6<p>
David Friedmanfffa8ac2016-03-07 22:13:29 -08007 The following code samples are provided for Android N. To
Joe Fernandez561db662016-03-03 19:02:17 -08008 download the samples in Android Studio, select the <b>File &gt; Import
9 Samples</b> menu option.
Dirk Dougherty5748bc42016-02-06 18:24:32 -080010</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
Joe Fernandez561db662016-03-03 19:02:17 -080018<h3 id="mw">Multi-Window Playground</h3>
Trevor Johns74c762e2016-03-08 21:04:20 -080019<img src="{@docRoot}preview/images/sample-multiwindow.png" style="float: left; padding-right: 0.5em" height="250" width="156"/>
Dirk Dougherty5748bc42016-02-06 18:24:32 -080020<p>
Joe Fernandez561db662016-03-03 19:02:17 -080021 This sample demonstrates how to take advantage of multiple window
22 user interfaces with your app.
23</p>
24<p>
Joe Fernandez5bc83ac2016-03-07 20:42:04 -080025 <a href="https://github.com/googlesamples/android-MultiWindowPlayground">
Joe Fernandez561db662016-03-03 19:02:17 -080026 Get it on GitHub</a>
Dirk Dougherty5748bc42016-02-06 18:24:32 -080027</p>
28
Trevor Johns74c762e2016-03-08 21:04:20 -080029<div style="clear: both;"></div>
Trevor Johns67c56712016-03-08 19:17:08 -080030<h3 id="an">Active Notifications</h3>
Trevor Johns74c762e2016-03-08 21:04:20 -080031<img src="{@docRoot}preview/images/sample-activenotifications.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
Dirk Dougherty5748bc42016-02-06 18:24:32 -080032<p>
Trevor Johns67c56712016-03-08 19:17:08 -080033 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.
Joe Fernandez561db662016-03-03 19:02:17 -080036</p>
37<p>
Trevor Johns67c56712016-03-08 19:17:08 -080038 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">
Joe Fernandez561db662016-03-03 19:02:17 -080043 Get it on GitHub</a>
Dirk Dougherty5748bc42016-02-06 18:24:32 -080044</p>
45
Trevor Johns74c762e2016-03-08 21:04:20 -080046<div style="clear: both;"></div>
Trevor Johns67c56712016-03-08 19:17:08 -080047<h3 id="ms">Messaging Service</h3>
Trevor Johns74c762e2016-03-08 21:04:20 -080048<img src="{@docRoot}preview/images/sample-messagingservice.png" style="float: left; padding-right: 0.5em" height="250" width="150" />
Dirk Dougherty5748bc42016-02-06 18:24:32 -080049<p>
Trevor Johns67c56712016-03-08 19:17:08 -080050 This is a pre-existing sample which demonstrates how to use
51 NotificationManager to tell how many notifications an application is currently
52 showing.
Joe Fernandez561db662016-03-03 19:02:17 -080053</p>
54<p>
Trevor Johns67c56712016-03-08 19:17:08 -080055 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">
Joe Fernandez561db662016-03-03 19:02:17 -080060 Get it on GitHub</a>
Dirk Dougherty5748bc42016-02-06 18:24:32 -080061</p>
62
Trevor Johns74c762e2016-03-08 21:04:20 -080063<div style="clear: both;"></div>
Takeshi Hagikuraa2d470b2016-03-08 13:03:20 +090064<h3 id="fbe">Direct Boot</h3>
Trevor Johns74c762e2016-03-08 21:04:20 -080065<img src="{@docRoot}preview/images/sample-directboot.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
Dirk Dougherty5748bc42016-02-06 18:24:32 -080066<p>
Joe Fernandez561db662016-03-03 19:02:17 -080067 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>
Takeshi Hagikuraa2d470b2016-03-08 13:03:20 +090071 <a href="https://github.com/googlesamples/android-DirectBoot">
Joe Fernandez561db662016-03-03 19:02:17 -080072 Get it on GitHub</a>
Dirk Dougherty5748bc42016-02-06 18:24:32 -080073</p>
74
Trevor Johns74c762e2016-03-08 21:04:20 -080075<div style="clear: both;"></div>
Joe Fernandez561db662016-03-03 19:02:17 -080076<h3 id="sda">Scoped Directory Access</h3>
Trevor Johns74c762e2016-03-08 21:04:20 -080077<img src="{@docRoot}preview/images/sample-scopeddirectoryaccess.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
Dirk Dougherty5748bc42016-02-06 18:24:32 -080078<p>
Joe Fernandez561db662016-03-03 19:02:17 -080079 This sample demonstrates how to read and write data from specific
80 directories, while requiring fewer permissions.
81</p>
82<p>
83 <a href="https://github.com/googlesamples/android-ScopedDirectoryAccess">
84 Get it on GitHub</a>
Trevor Johns74c762e2016-03-08 21:04:20 -080085</p>