docs: Fixes to N Preview API overview
Many HTML problems (bad links, non-escaped < and &, unclosed blocks); fixing the ones I saw. We should give this a more thorough scrubbing. Also removed spurious link to (non-existent) "Testing with Just in Time" section. See first comment for doc stage location. Change-Id: I07ca445bc73aee012e02ff3ce9765efcde9df14d
This commit is contained in:
@@ -42,9 +42,14 @@ page.image=images/cards/card-n-apis_2x.png
|
||||
now as part of the N Developer Preview. The sections below highlight some of
|
||||
the new features for developers. </p>
|
||||
|
||||
<p>Make sure to check out the <a href="{@docRoot}preview/behavior-changes.html">Behavior Changes</a> to learn about areas
|
||||
where platform changes may affect your apps, take a look at the developer guides to learn more about key features, and download the <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a> for details on new APIs. </p>
|
||||
|
||||
<p>
|
||||
Make sure to check out the <a href=
|
||||
"{@docRoot}preview/behavior-changes.html">Behavior Changes</a> to learn about
|
||||
areas where platform changes may affect your apps, take a look at the
|
||||
developer guides to learn more about key features, and download the <a href=
|
||||
"{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a> for details on
|
||||
new APIs.
|
||||
</p>
|
||||
|
||||
<h2 id="multi-window_support">Multi-window support</h2>
|
||||
|
||||
@@ -59,8 +64,10 @@ running Android N, users can run two apps side-by-side or
|
||||
one-above-the-other in splitscreen mode. Users can resize the apps by dragging
|
||||
the divider between them. </li>
|
||||
|
||||
<li>On Android TV devices, apps can put themselves in <a href="{@docRoot}preview/features/picture-in-picture.html">picture-in-picture mode</a>, allowing them to continue showing content while the user browses or interacts
|
||||
with other apps. See below for more information. </li>
|
||||
<li>On Android TV devices, apps can put themselves in <a
|
||||
href="{@docRoot}preview/features/picture-in-picture.html">picture-in-picture
|
||||
mode</a>, allowing them to continue showing content while the user browses or
|
||||
interacts with other apps. See below for more information. </li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -85,8 +92,11 @@ minimum allowable dimensions, preventing users from resizing the activity below
|
||||
that size. You can also disable multi-window display for your app, which
|
||||
ensures that the system will only show your app in full-screen mode.</p>
|
||||
|
||||
<p>For more information, see the <a href="{@docRoot}preview/features/multi-window.html">Multi-Window Support</a> developer documentation.</p>
|
||||
|
||||
<p>
|
||||
For more information, see the <a href=
|
||||
"{@docRoot}preview/features/multi-window.html">Multi-Window Support</a>
|
||||
developer documentation.
|
||||
</p>
|
||||
|
||||
<h2 id="notification_enhancements">Notification enhancements</h2>
|
||||
|
||||
@@ -94,26 +104,46 @@ that size. You can also disable multi-window display for your app, which
|
||||
use. Some of the changes include:</p>
|
||||
|
||||
<ul>
|
||||
<li> <strong>Template updates</strong>: We're updating notification templates to put a new emphasis on hero image and
|
||||
avatar. Developers will be able to take advantage of the new
|
||||
templates with minimal adjustments in their code.</li>
|
||||
<li> <strong>Bundled notifications</strong>: The system can group messages together, for example by message topic, and display the group. A user can take actions, such as Dismiss or Archive, on them in place. If you’ve implemented notifications for Android Wear, you’ll already be familiar with this model.
|
||||
with this model. </li>
|
||||
<li> <strong>Direct reply</strong>: For real-time communication apps, the Android system supports inline replies
|
||||
so that users can quickly respond to an SMS or text message directly within the
|
||||
notification interface.</li>
|
||||
<li> <strong>Custom views</strong>: Two new APIs enable you to leverage system decorations, such as notification
|
||||
headers and actions, when using custom views in notifications.</li>
|
||||
<li>
|
||||
<strong>Template updates</strong>: We're updating notification templates to
|
||||
put a new emphasis on hero image and avatar. Developers will be able to
|
||||
take advantage of the new templates with minimal adjustments in their code.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Bundled notifications</strong>: The system can group messages
|
||||
together, for example by message topic, and display the group. A user can
|
||||
take actions, such as Dismiss or Archive, on them in place. If you’ve
|
||||
implemented notifications for Android Wear, you’ll already be familiar with
|
||||
this model. with this model.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Direct reply</strong>: For real-time communication apps, the
|
||||
Android system supports inline replies so that users can quickly respond to
|
||||
an SMS or text message directly within the notification interface.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Custom views</strong>: Two new APIs enable you to leverage system
|
||||
decorations, such as notification headers and actions, when using custom
|
||||
views in notifications.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="col-4of12">
|
||||
<img src="{@docRoot}preview/images/notifications-1.png" alt="" style="padding:.5em;max-width:226px" />
|
||||
<img src="{@docRoot}preview/images/notifications-1.png" alt=""
|
||||
style="padding:.5em;max-width:226px">
|
||||
</div>
|
||||
|
||||
<div class="col-4of12">
|
||||
<img src="{@docRoot}preview/images/notifications-3.png" alt="" style="padding:.5em;max-width:226px" />
|
||||
<img src="{@docRoot}preview/images/notifications-3.png" alt=""
|
||||
style="padding:.5em;max-width:226px">
|
||||
</div>
|
||||
|
||||
<div class="col-4of12">
|
||||
<img src="{@docRoot}preview/images/notifications-2.png" alt="" style="padding:.5em;max-width:226px" />
|
||||
<img src="{@docRoot}preview/images/notifications-2.png" alt=""
|
||||
style="padding:.5em;max-width:226px">
|
||||
</div>
|
||||
|
||||
|
||||
@@ -121,7 +151,9 @@ headers and actions, when using custom views in notifications.</li>
|
||||
<strong>Figure 2.</strong> Bundled notifications and direct reply.
|
||||
</p>
|
||||
|
||||
<p>To learn how to implement the new features, see the <a href="{@docRoot}notification-updates.html">Notifications</a> guide.</p>
|
||||
<p>To learn how to implement the new features, see the
|
||||
<a href="{@docRoot}preview/features/notification-updates.html">Notifications</a>
|
||||
guide.</p>
|
||||
|
||||
|
||||
<h2 id="tile_api">Quick Settings Tile API</h2>
|
||||
@@ -147,12 +179,22 @@ displayed — users can add or move tiles just by dragging and dropping them
|
||||
<p>For developers, Android N also adds a new API that lets you define your own
|
||||
Quick Settings tiles to give users easy access to key controls and actions in your app.</p>
|
||||
|
||||
<p>Quick Settings tiles are reserved for controls or actions that are either
|
||||
urgently required or frequently used, and should not be used as shortcuts to launching an app. </p>
|
||||
<p>
|
||||
Quick Settings tiles are reserved for controls or actions that are either
|
||||
urgently required or frequently used, and should not be used as shortcuts to
|
||||
launching an app.
|
||||
</p>
|
||||
|
||||
<p>Once you’ve defined your tiles, you can surface them to users, who can add them to Quick Settings just by drag and drop. </p>
|
||||
<p>
|
||||
Once you’ve defined your tiles, you can surface them to users, who can add
|
||||
them to Quick Settings just by drag and drop.
|
||||
</p>
|
||||
|
||||
<p>For information about creating an app tile, see the <code>android.service.quicksettings.Tile</code> in the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>. </p>
|
||||
<p>
|
||||
For information about creating an app tile, see the
|
||||
<code>android.service.quicksettings.Tile</code> in the downloadable <a href=
|
||||
"{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.
|
||||
</p>
|
||||
|
||||
<h2 id="data_saver">Data Saver</h2>
|
||||
|
||||
@@ -212,14 +254,20 @@ should follow, see <a href="{@docRoot}preview/features/multilingual-support.html
|
||||
|
||||
<h2 id="icu4">ICU4J APIs in Android</h2>
|
||||
|
||||
<p>Android N now offers a subset of <a href="http://site.icu-project.org/">ICU4J</a> APIs in the Android framework under the <code>android.icu</code> package. Migration is
|
||||
easy, and mostly entails simply changing from the <code>com.java.icu</code> namespace to
|
||||
<code>android.icu</code>.
|
||||
If you are already using an ICU4J bundle in your apps, switching to the
|
||||
<code>android.icu</code> APIs provided in the Android framework can produce substantial
|
||||
savings in APK size.</p>
|
||||
<p>
|
||||
Android N now offers a subset of <a href=
|
||||
"http://site.icu-project.org/">ICU4J</a> APIs in the Android framework under
|
||||
the <code>android.icu</code> package. Migration is easy, and mostly entails
|
||||
simply changing from the <code>com.java.icu</code> namespace to
|
||||
<code>android.icu</code>. If you are already using an ICU4J bundle in your
|
||||
apps, switching to the <code>android.icu</code> APIs provided in the Android
|
||||
framework can produce substantial savings in APK size.
|
||||
</p>
|
||||
|
||||
<p>To learn more about the Android ICU4J APIs, see <a href="{@docRoot}preview/features/icu4j-framework.html">ICU4J Support</a>.</p>
|
||||
<p>
|
||||
To learn more about the Android ICU4J APIs, see <a href=
|
||||
"{@docRoot}preview/features/icu4j-framework.html">ICU4J Support</a>.
|
||||
</p>
|
||||
|
||||
<h2 id="android_tv_recording">Android TV recording</h2>
|
||||
|
||||
@@ -265,7 +313,7 @@ devices. Among the other benefits that apps can take advantage of are:</p>
|
||||
|
||||
<ul>
|
||||
<li> Numbers blocked on calls are also blocked on texts
|
||||
<li> Blocked numbers can persist across resets and devices through the Backup &
|
||||
<li> Blocked numbers can persist across resets and devices through the Backup &
|
||||
Restore feature
|
||||
<li> Multiple apps can use the same blocked numbers list
|
||||
</ul>
|
||||
@@ -275,14 +323,20 @@ read the blocked numbers list on the device and perform service-side blocking
|
||||
for the user in order to stop unwanted calls and texts from reaching the user
|
||||
through any medium, such as a VOIP endpoint or forwarding phones.</p>
|
||||
|
||||
<p>For more information, see <code>android.provider.BlockedNumberContract</code> in the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.</p>
|
||||
<p>
|
||||
For more information, see <code>android.provider.BlockedNumberContract</code>
|
||||
in the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API
|
||||
Reference</a>.
|
||||
</p>
|
||||
|
||||
<h2 id="call_screening">Call screening</h2>
|
||||
|
||||
|
||||
<p>Android N allows the default phone app to screen incoming calls. The phone app
|
||||
does this by implementing the new <code>CallScreeningService</code>, which allows the phone app to perform a number of actions based on an
|
||||
incoming call's {@link android.telecom.Call.Details Call.Details}, such as:</p>
|
||||
<p>
|
||||
Android N allows the default phone app to screen incoming calls. The phone
|
||||
app does this by implementing the new <code>CallScreeningService</code>,
|
||||
which allows the phone app to perform a number of actions based on an
|
||||
incoming call's {@link android.telecom.Call.Details Call.Details}, such as:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li> Reject the incoming call
|
||||
@@ -290,7 +344,11 @@ incoming call's {@link android.telecom.Call.Details Call.Details}, such as:</p>
|
||||
<li> Do not show the user a notification for the call
|
||||
</ul>
|
||||
|
||||
<p>For more information, see <code>android.telecom.CallScreeningService</code> in the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.</p>
|
||||
<p>
|
||||
For more information, see <code>android.telecom.CallScreeningService</code>
|
||||
in the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API
|
||||
Reference</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<h2 id="direct_boot">Direct boot</h2>
|
||||
@@ -345,14 +403,14 @@ key confirms the existence of a hardware-backed keystore, along with
|
||||
<p>To ensure that the device is using a secure, official Android factory
|
||||
image, Key Attestation requires that the device <a
|
||||
class="external-link"
|
||||
href=”https://source.android.com/security/verifiedboot/verified-boot.html#bootloader_requirements”>bootloader</a>
|
||||
href="https://source.android.com/security/verifiedboot/verified-boot.html#bootloader_requirements">bootloader</a>
|
||||
provide the following information to the <a class="external-link"
|
||||
href=”https://source.android.com/security/trusty/index.html”>Trusted
|
||||
href="https://source.android.com/security/trusty/index.html">Trusted
|
||||
Execution Environment (TEE)</a>:</p>
|
||||
|
||||
<ul>
|
||||
<li>The OS version and patch level installed on the device</li>
|
||||
<li>The <a class="external-link" href=”https://source.android.com/security/verifiedboot/index.html”>Verified
|
||||
<li>The <a class="external-link" href="https://source.android.com/security/verifiedboot/index.html">Verified
|
||||
Boot</a> public key and lock status</li>
|
||||
</ul>
|
||||
|
||||
@@ -381,11 +439,12 @@ base.
|
||||
</li>
|
||||
<li><b>Cleartext traffic opt-out.</b> Lets an application protect itself from
|
||||
accidental usage of cleartext traffic.</li>
|
||||
<li><b>Certificate pinning.</b> An advanced feature that lets an application limit which server keys are trusted for secure connections.</li>
|
||||
<li><b>Certificate pinning.</b> An advanced feature that lets an application
|
||||
limit which server keys are trusted for secure connections.</li>
|
||||
</ul>
|
||||
|
||||
<p>For more information, see <a
|
||||
href=”{@docRoot}guide/topics/security/security-config.html”>Network Security
|
||||
href="{@docRoot}preview/features/security-config.html">Network Security
|
||||
Config</a>.</p>
|
||||
|
||||
<h3 id="default_trusted_ca">Default Trusted Certificate Authority</h3>
|
||||
@@ -393,7 +452,7 @@ Config</a>.</p>
|
||||
<p>By default, apps that target Android N only trust system-provided certificates
|
||||
and no longer trust user-added Certificate Authorities (CA). Apps targeting Android
|
||||
N that wish to trust user-added CAs should use the
|
||||
<a href=”/preview/features/security-config.html”>Network Security Config</a> to
|
||||
<a href="{@docRoot}preview/features/security-config.html">Network Security Config</a> to
|
||||
specify how user CAs should be trusted.</p>
|
||||
|
||||
<h3 id="apk_signature_v2">APK signature scheme v2</h3>
|
||||
@@ -428,7 +487,9 @@ storage access to your app. When you use the new APIs, the system uses a simple
|
||||
permissions UI that clearly details what directory the application is
|
||||
requesting access to.</p>
|
||||
|
||||
<p>For more information, see the <a href="">Scoped Directory Access</a> developer documentation.</p>
|
||||
<p>For more information, see the
|
||||
<a href="{@docRoot}preview/features/scoped-folder-access.html">Scoped
|
||||
Directory Access</a> developer documentation.</p>
|
||||
|
||||
<h2 id="android_for_work">Android for Work</h2>
|
||||
|
||||
@@ -438,16 +499,27 @@ related to Android N, please see Android for Work Changes.</p>
|
||||
|
||||
<h3 id="work_profile_security_challenge">Work profile security challenge </h3>
|
||||
|
||||
<p>Profile owners can specify a separate security challenge for apps running in
|
||||
the work profile. The work challenge is shown when a user attempts to open any
|
||||
work apps. Successful completion of the security challenge unlocks the work
|
||||
profile and decrypts it if necessary. For profile owners, <code>ACTION_SET_NEW_PASSWORD</code> prompts the user to set a work challenge, and <code>ACTION_SET_NEW_PARENT_PROFILE_PASSWORD</code> prompts the user to set a device lock.</p>
|
||||
|
||||
<p>Profile owners can set distinct password policies for the work challenge (such
|
||||
as how long the PIN needs to be, or whether a fingerprint can be used to unlock
|
||||
the profile) using the <code>setPasswordQuality()</code>, <code>setPasswordMinimumLength()</code> and related methods. The profile owner can also set the device lock using the <code>DevicePolicyManager</code> instance returned by the new <code>getParentProfileInstance()</code> method. Additionally, profile owners can customize the credentials screen for
|
||||
the work challenge using the new <code>setOrganizationColor()</code> and <code>setOrganizationName()</code> methods.</p>
|
||||
<p>
|
||||
Profile owners can specify a separate security challenge for apps running in
|
||||
the work profile. The work challenge is shown when a user attempts to open
|
||||
any work apps. Successful completion of the security challenge unlocks the
|
||||
work profile and decrypts it if necessary. For profile owners,
|
||||
<code>ACTION_SET_NEW_PASSWORD</code> prompts the user to set a work
|
||||
challenge, and <code>ACTION_SET_NEW_PARENT_PROFILE_PASSWORD</code> prompts
|
||||
the user to set a device lock.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Profile owners can set distinct password policies for the work challenge
|
||||
(such as how long the PIN needs to be, or whether a fingerprint can be used
|
||||
to unlock the profile) using the <code>setPasswordQuality()</code>,
|
||||
<code>setPasswordMinimumLength()</code> and related methods. The profile
|
||||
owner can also set the device lock using the <code>DevicePolicyManager</code>
|
||||
instance returned by the new <code>getParentProfileInstance()</code> method.
|
||||
Additionally, profile owners can customize the credentials screen for the
|
||||
work challenge using the new <code>setOrganizationColor()</code> and
|
||||
<code>setOrganizationName()</code> methods.
|
||||
</p>
|
||||
<h3 id="turn_off_work">Turn off work </h3>
|
||||
|
||||
<p>On a device with a work profile, users can toggle work mode. When work mode is
|
||||
@@ -463,17 +535,22 @@ indicates that work apps and widgets are not accessible. </p>
|
||||
through a specified VPN. The system automatically starts that VPN after the
|
||||
device boots.</p>
|
||||
|
||||
<p>New <code>DevicePolicyManager</code> methods are <code>setAlwaysOnVpnPackage()</code> and <code>getAlwaysOnVpnPackage()</code>.</p>
|
||||
<p>
|
||||
New <code>DevicePolicyManager</code> methods are
|
||||
<code>setAlwaysOnVpnPackage()</code> and
|
||||
<code>getAlwaysOnVpnPackage()</code>.
|
||||
</p>
|
||||
|
||||
<p>Because VPN services can be bound directly by the system without app
|
||||
interaction, VPN clients need to handle new entry points for Always on VPN. As
|
||||
before, services are indicated to the system by an intent filter matching
|
||||
action <code>android.net.VpnService</code>. </p>
|
||||
|
||||
<p>Users can also manually set Always on VPN clients that implement <code>VPNService</code> methods in the primary user using <strong>Settings>More>Vpn</strong>.</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
Users can also manually set Always on VPN clients that implement
|
||||
<code>VPNService</code> methods in the primary user using
|
||||
<strong>Settings>More>Vpn</strong>.
|
||||
</p>
|
||||
|
||||
|
||||
<h2 id="jit_aot">Profile-guided JIT/AOT compilation</h2>
|
||||
@@ -498,10 +575,6 @@ binaries. This feature is especially important on low-memory devices.</p>
|
||||
device battery. It does precompilation only when then the device is idle and
|
||||
charging, saving time and battery by doing that work in advance.</p>
|
||||
|
||||
<p>For details on how to test your app with profile-guided compilation, see
|
||||
<a href="{@docRoot}preview/behavior-changes.html">Testing with JIT/AOT</a></p>
|
||||
|
||||
|
||||
<h2 id="quick_path_to_app_install">Quick path to app install</h2>
|
||||
|
||||
<p>One of the most tangible benefits of ART's JIT compiler is the speed of app
|
||||
@@ -539,7 +612,7 @@ GPS/Wi-Fi scans.</p>
|
||||
<p>The best practices for adapting your app to Doze are the same whether the
|
||||
device is moving or not, so if you already updated your app to gracefully
|
||||
handle Doze, you're all set. If not, start <a
|
||||
href=”{@docRoot}training/monitoring-device-state/doze-standby.html#assessing_your_app”>adapting
|
||||
href="{@docRoot}training/monitoring-device-state/doze-standby.html#assessing_your_app">adapting
|
||||
your app to Doze</a> now.</p>
|
||||
|
||||
<h2 id="background_optimizations">Project Svelte: Background optimizations</h2>
|
||||
@@ -558,10 +631,15 @@ for users. Apps can schedule jobs while letting the system optimize based on
|
||||
memory, power, and connectivity conditions. JobScheduler offers control and
|
||||
simplicity, and we want all apps to use it. </p>
|
||||
|
||||
<p>Another good option is <a href="https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager"><code>GCMNetworkManager</a>, part of Google Pl</p>ay Services, which offers similar job scheduling with
|
||||
compatibility across legacy versions of Android.</p>
|
||||
<p>
|
||||
Another good option is <a href=
|
||||
"https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager">
|
||||
<code>GCMNetworkManager</code></a>, part of Google Play Services, which
|
||||
offers similar job scheduling with compatibility across legacy versions of
|
||||
Android.
|
||||
</p>
|
||||
|
||||
<p>We're continuing to extend <code>JobScheduler</code> and <code>GCMNetworkManager</code> to meet more of
|
||||
<p>We're continuing to extend <code>JobScheduler</code> and <code>GCMNetworkManager</code> to meet more of
|
||||
your use cases — for example, in Android N you can now schedule background
|
||||
work based on changes in Content Providers. At the same time we're starting to
|
||||
deprecate some of the older patterns that can reduce system performance,
|
||||
@@ -575,7 +653,11 @@ background processes of multiple apps at once and strain memory and battery. If
|
||||
your app is receiving these, take advantage of the N Developer Preview to
|
||||
migrate to <code>JobScheduler</code> and related APIs instead. </p>
|
||||
|
||||
<p>Take a look at the <a href="{@docRoot}preview/features/background-optimization.html">Background Optimizations</a> documentation for details.</p>
|
||||
<p>
|
||||
Take a look at the <a href=
|
||||
"{@docRoot}preview/features/background-optimization.html">Background
|
||||
Optimizations</a> documentation for details.
|
||||
</p>
|
||||
|
||||
<h2 id="gles_32">OpenGL™ ES 3.2 API</h2>
|
||||
|
||||
@@ -591,7 +673,7 @@ href="https://www.khronos.org/registry/gles/extensions/ANDROID/ANDROID_extension
|
||||
|
||||
<p>The framework API for OpenGL ES 3.2 on Android N is provided with the
|
||||
<code>GLES32</code> class. When using OpenGL ES 3.2, be sure to declare the
|
||||
requirement in your manifest file, using the <code><:uses-feature></code> tag and
|
||||
requirement in your manifest file, using the <code><uses-feature></code> tag and
|
||||
the <code>android:glEsVersion</code> attribute. </p>
|
||||
|
||||
<p>For information about using OpenGL ES, including how to check a device's
|
||||
|
||||
Reference in New Issue
Block a user