Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 1 | page.title=Samples |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 2 | page.tags="preview", "samples", "android" |
| 3 | page.image=images/cards/card-n-samples_2x.png |
Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 4 | @jd:body |
| 5 | |
| 6 | <p> |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 7 | The following code samples are provided for Android N. To |
| 8 | download the samples in Android Studio, select the <b>File > Import |
| 9 | Samples</b> menu option. |
Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 10 | </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 Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 18 | <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 Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 20 | <p> |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 21 | 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 Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 27 | </p> |
| 28 | |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 29 | <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 Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 32 | <p> |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 33 | 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 Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 44 | </p> |
| 45 | |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 46 | <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 Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 49 | <p> |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 50 | 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 Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 61 | </p> |
| 62 | |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 63 | <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 Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 66 | <p> |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 67 | 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 Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 73 | </p> |
| 74 | |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 75 | <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 Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 78 | <p> |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 79 | This sample demonstrates how to read and write data from specific |
| 80 | directories, while requiring fewer permissions. |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 81 | </p> |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 82 | <p> |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 83 | <a href="https://github.com/googlesamples/android-ScopedDirectoryAccess"> |
| 84 | Get it on GitHub</a> |
| 85 | </p> |