Merge "docs: Added section describing Launcher Shortcuts." into mnc-mr-docs
am: 9d4afa9
* commit '9d4afa9ce0330ea80462298e12dbbd3227465e21':
docs: Added section describing Launcher Shortcuts.
Change-Id: I9e992397930b3624e688c618acabee3a7b7a4ba9
This commit is contained in:
@@ -34,6 +34,7 @@ page.image=images/cards/card-n-apis_2x.png
|
|||||||
<li><a href="#default_trusted_ca">Default Trusted CA</a></li>
|
<li><a href="#default_trusted_ca">Default Trusted CA</a></li>
|
||||||
<li><a href="apk_signature_v2">APK signature scheme v2</a></li>
|
<li><a href="apk_signature_v2">APK signature scheme v2</a></li>
|
||||||
<li><a href="#scoped_directory_access">Scoped directory access</a></li>
|
<li><a href="#scoped_directory_access">Scoped directory access</a></li>
|
||||||
|
<li><a href="#launcher_shortcuts">Launcher shortcuts</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -696,8 +697,57 @@ requesting access to.</p>
|
|||||||
<a href="{@docRoot}preview/features/scoped-folder-access.html">Scoped
|
<a href="{@docRoot}preview/features/scoped-folder-access.html">Scoped
|
||||||
Directory Access</a> developer documentation.</p>
|
Directory Access</a> developer documentation.</p>
|
||||||
|
|
||||||
|
<h2 id="launcher_shortcuts">
|
||||||
|
Launcher shortcuts
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Android N allows apps to define action-specific shortcuts which can be
|
||||||
|
displayed in the launcher. These <em>launcher shortcuts</em> let your users
|
||||||
|
quickly start common or recommended tasks within your app. Each shortcut
|
||||||
|
contains an <a href=
|
||||||
|
"{@docRoot}guide/components/intents-filters.html">intent</a>, which links the
|
||||||
|
shortcut to a specific action in your app. Examples of these actions include:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Navigating users to a particular location in a mapping app.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Sending messages to a friend in a communication app.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Playing the next episode of a TV show in a media app.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>Loading the last save point in a gaming app.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Your app can create up to five <em>dynamic shortcuts</em>. When users perform
|
||||||
|
a gesture over your app's launcher icon, these shortcuts appear. By dragging
|
||||||
|
the shortcuts onto the launcher, users can make persistent copies of the
|
||||||
|
shortcuts, called <em>pinned shortcuts</em>. Users can create an unlimited
|
||||||
|
number of pinned shortcuts for each app.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="note">
|
||||||
|
<strong>Note:</strong> Although other apps can't access your shortcut data,
|
||||||
|
the launcher <strong>does</strong> have access to this data. Therefore, the
|
||||||
|
shortcuts you create should conceal sensitive user information.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You can use this command to view your app's shortcuts:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre class="no-pretty-print">
|
||||||
|
$ adb shell dumpsys shortcut
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
To update all shortcuts and to delete dynamic shortcuts, use the appropriate
|
||||||
|
methods that the Launcher Shortcut API provides. For more details about this
|
||||||
|
API, see <code>android.content.pm.ShortcutManager</code> in the downloadable
|
||||||
|
<a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.
|
||||||
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user