Home | History | Annotate | Download | only in preview
      1 page.title=Samples
      2 page.tags="preview", "samples", "android"
      3 page.image=images/cards/card-n-samples_2x.png
      4 @jd:body
      5 
      6 <p>
      7   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.
     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 
     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"/>
     20 <p>
     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>
     27 </p>
     28 
     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" />
     32 <p>
     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>
     44 </p>
     45 
     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" />
     49 <p>
     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>
     61 </p>
     62 
     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" />
     66 <p>
     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>
     73 </p>
     74 
     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" />
     78 <p>
     79   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>
     85 </p>