Home | History | Annotate | Download | only in new
      1 page.title=What's New
      2 page.image=images/cards/samples-new_2x.png
      3 
      4 @jd:body
      5 
      6 <p>The following code samples were recently published. You can
      7 download them in the Android SDK Manager under the <b>Samples for SDK</b>
      8 component for Android 7.1 (API 25).</p>
      9 
     10 <p class="note">
     11   <strong>Note:</strong> The downloadable projects are designed
     12    for use with Gradle and Android Studio.
     13 </p>
     14 
     15 <!-- NOTE TO EDITORS: add most recent samples first -->
     16 
     17 
     18 <h3 id="app-shortcuts">App shortcuts sample</h3>
     19 
     20 <!-- TBA
     21 <img src="sample-img.png" style="float: left; padding-right: 0.5em"
     22  width="xxx"/>
     23 -->
     24 
     25 <p>
     26   This sample demonstrates how to use the <a href=
     27   "/preview/app-shortcuts.html">app shortcuts API</a> introduced in Android 7.1
     28   (API level 25). This API allows an application to define a set of intents
     29   which are displayed when a user long-presses on the app's launcher icon.
     30   Examples are given for registering links both statically in XML, as well as
     31   dynamically at runtime.
     32 </p>
     33 
     34 <p>
     35   <a href="/samples/AppShortcuts/index.html">App shortcuts sample</a>
     36 </p>
     37 
     38 <h3 id="img-kbd-app">Image keyboard app sample</h3>
     39 
     40 <!-- TBA
     41 <img src="sample-img.png" style="float: left; padding-right: 0.5em"
     42  width="xxx"/>
     43 -->
     44 
     45 <p>
     46   This sample demonstrates how to implement the <a href=
     47   "/reference/android/view/inputmethod/InputConnection.html#commitContent(android.view.inputmethod.InputContentInfo,%20int,%20android.os.Bundle)">
     48   Commit Content API</a>, using the <a href=
     49   "/topic/libraries/support-library/index.html">Android Support Library</a>.
     50   This API provides a universal way for IMEs to send images and other rich
     51   content directly to a text editor in an app, allowing users to compose
     52   content using custom emojis, stickers, or other rich content provided by
     53   other applications.
     54 </p>
     55 
     56 <p>
     57   <a href="/samples/CommitContentSampleApp/index.html">Image keyboard app sample</a>
     58 </p>
     59 
     60 <h3 id="img-kbd-ime">Image keyboard IME sample</h3>
     61 
     62 <!-- TBA
     63 <img src="sample-img.png" style="float: left; padding-right: 0.5em"
     64  width="xxx"/>
     65 -->
     66 
     67 <p>
     68   This sample demonstrates how to write a <a href=
     69   "/preview/image-keyboard.html">custom image keyboard</a> using the <a href=
     70   "/reference/android/view/inputmethod/InputConnection.html#commitContent(android.view.inputmethod.InputContentInfo,%20int,%20android.os.Bundle)">
     71   Commit Content API</a> and the <a href=
     72   "/topic/libraries/support-library/index.html">Android Support Library</a>.
     73   This keyboard will be displayed inside compatible apps (also using the Commit
     74   Content API), allowing users to insert emojis, stickers, or other rich
     75   content into text editors.
     76 </p>
     77 
     78 <p>
     79   <a href="/samples/CommitContentSampleIME/index.html">Image keyboard IME sample</a>
     80 </p>
     81