From 9b21857dd81daccffa894c36fc7b35f15b01d28c Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Wed, 9 Mar 2016 11:17:07 -0800 Subject: 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 --- docs/html/preview/api-overview.jd | 222 ++++++++++++++++++++++++++------------ 1 file changed, 152 insertions(+), 70 deletions(-) (limited to 'docs/html') diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd index 7eba386a9782..5cef96560c80 100644 --- a/docs/html/preview/api-overview.jd +++ b/docs/html/preview/api-overview.jd @@ -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.

-

Make sure to check out the Behavior Changes 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 API Reference for details on new APIs.

- +

+ Make sure to check out the Behavior Changes 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 API Reference for details on + new APIs. +

Multi-window support

@@ -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. -
  • On Android TV devices, apps can put themselves in picture-in-picture mode, allowing them to continue showing content while the user browses or interacts -with other apps. See below for more information.
  • +
  • On Android TV devices, apps can put themselves in picture-in-picture +mode, allowing them to continue showing content while the user browses or +interacts with other apps. See below for more information.
  • @@ -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.

    -

    For more information, see the Multi-Window Support developer documentation.

    - +

    + For more information, see the Multi-Window Support + developer documentation. +

    Notification enhancements

    @@ -94,26 +104,46 @@ that size. You can also disable multi-window display for your app, which use. Some of the changes include:

    - +
    +
    - +
    +
    - +
    @@ -121,7 +151,9 @@ headers and actions, when using custom views in notifications. Figure 2. Bundled notifications and direct reply.

    -

    To learn how to implement the new features, see the Notifications guide.

    +

    To learn how to implement the new features, see the + Notifications + guide.

    Quick Settings Tile API

    @@ -147,12 +179,22 @@ displayed — users can add or move tiles just by dragging and dropping them

    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.

    -

    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.

    +

    + 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. +

    -

    Once you’ve defined your tiles, you can surface them to users, who can add them to Quick Settings just by drag and drop.

    +

    + Once you’ve defined your tiles, you can surface them to users, who can add + them to Quick Settings just by drag and drop. +

    -

    For information about creating an app tile, see the android.service.quicksettings.Tile in the downloadable API Reference.

    +

    + For information about creating an app tile, see the + android.service.quicksettings.Tile in the downloadable API Reference. +

    Data Saver

    @@ -212,14 +254,20 @@ should follow, see ICU4J APIs in Android -

    Android N now offers a subset of ICU4J APIs in the Android framework under the android.icu package. Migration is - easy, and mostly entails simply changing from the com.java.icu namespace to - android.icu. -If you are already using an ICU4J bundle in your apps, switching to the - android.icu APIs provided in the Android framework can produce substantial -savings in APK size.

    +

    + Android N now offers a subset of ICU4J APIs in the Android framework under + the android.icu package. Migration is easy, and mostly entails + simply changing from the com.java.icu namespace to + android.icu. If you are already using an ICU4J bundle in your + apps, switching to the android.icu APIs provided in the Android + framework can produce substantial savings in APK size. +

    -

    To learn more about the Android ICU4J APIs, see ICU4J Support.

    +

    + To learn more about the Android ICU4J APIs, see ICU4J Support. +

    Android TV recording

    @@ -265,7 +313,7 @@ devices. Among the other benefits that apps can take advantage of are:

    @@ -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.

    -

    For more information, see android.provider.BlockedNumberContract in the downloadable API Reference.

    +

    + For more information, see android.provider.BlockedNumberContract + in the downloadable API + Reference. +

    Call screening

    - -

    Android N allows the default phone app to screen incoming calls. The phone app -does this by implementing the new CallScreeningService, 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:

    +

    + Android N allows the default phone app to screen incoming calls. The phone + app does this by implementing the new CallScreeningService, + 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: +

    -

    For more information, see android.telecom.CallScreeningService in the downloadable API Reference.

    +

    + For more information, see android.telecom.CallScreeningService + in the downloadable API + Reference. +

    Direct boot

    @@ -345,14 +403,14 @@ key confirms the existence of a hardware-backed keystore, along with

    To ensure that the device is using a secure, official Android factory image, Key Attestation requires that the device bootloader +href="https://source.android.com/security/verifiedboot/verified-boot.html#bootloader_requirements">bootloader provide the following information to the Trusted +href="https://source.android.com/security/trusty/index.html">Trusted Execution Environment (TEE):

    @@ -381,11 +439,12 @@ base.
  • Cleartext traffic opt-out. Lets an application protect itself from accidental usage of cleartext traffic.
  • -
  • Certificate pinning. An advanced feature that lets an application limit which server keys are trusted for secure connections.
  • +
  • Certificate pinning. An advanced feature that lets an application + limit which server keys are trusted for secure connections.
  • For more information, see Network Security +href="{@docRoot}preview/features/security-config.html">Network Security Config.

    Default Trusted Certificate Authority

    @@ -393,7 +452,7 @@ Config.

    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 -Network Security Config to +Network Security Config to specify how user CAs should be trusted.

    APK signature scheme v2

    @@ -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.

    -

    For more information, see the Scoped Directory Access developer documentation.

    +

    For more information, see the +Scoped +Directory Access developer documentation.

    Android for Work

    @@ -438,16 +499,27 @@ related to Android N, please see Android for Work Changes.

    Work profile security challenge

    -

    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, ACTION_SET_NEW_PASSWORD prompts the user to set a work challenge, and ACTION_SET_NEW_PARENT_PROFILE_PASSWORD prompts the user to set a device lock.

    - -

    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 setPasswordQuality(), setPasswordMinimumLength() and related methods. The profile owner can also set the device lock using the DevicePolicyManager instance returned by the new getParentProfileInstance() method. Additionally, profile owners can customize the credentials screen for -the work challenge using the new setOrganizationColor() and setOrganizationName() methods.

    +

    + 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, + ACTION_SET_NEW_PASSWORD prompts the user to set a work + challenge, and ACTION_SET_NEW_PARENT_PROFILE_PASSWORD prompts + the user to set a device lock. +

    +

    + 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 setPasswordQuality(), + setPasswordMinimumLength() and related methods. The profile + owner can also set the device lock using the DevicePolicyManager + instance returned by the new getParentProfileInstance() method. + Additionally, profile owners can customize the credentials screen for the + work challenge using the new setOrganizationColor() and + setOrganizationName() methods. +

    Turn off work

    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.

    through a specified VPN. The system automatically starts that VPN after the device boots.

    -

    New DevicePolicyManager methods are setAlwaysOnVpnPackage() and getAlwaysOnVpnPackage().

    +

    + New DevicePolicyManager methods are + setAlwaysOnVpnPackage() and + getAlwaysOnVpnPackage(). +

    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 android.net.VpnService.

    -

    Users can also manually set Always on VPN clients that implement VPNService methods in the primary user using Settings>More>Vpn.

    - - - +

    + Users can also manually set Always on VPN clients that implement + VPNService methods in the primary user using + Settings>More>Vpn. +

    Profile-guided JIT/AOT compilation

    @@ -498,10 +575,6 @@ binaries. This feature is especially important on low-memory devices.

    device battery. It does precompilation only when then the device is idle and charging, saving time and battery by doing that work in advance.

    -

    For details on how to test your app with profile-guided compilation, see - Testing with JIT/AOT

    - -

    Quick path to app install

    One of the most tangible benefits of ART's JIT compiler is the speed of app @@ -539,7 +612,7 @@ GPS/Wi-Fi scans.

    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 adapting +href="{@docRoot}training/monitoring-device-state/doze-standby.html#assessing_your_app">adapting your app to Doze now.

    Project Svelte: Background optimizations

    @@ -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.

    -

    Another good option is GCMNetworkManager, part of Google Pl

    ay Services, which offers similar job scheduling with -compatibility across legacy versions of Android.

    +

    + Another good option is + GCMNetworkManager, part of Google Play Services, which + offers similar job scheduling with compatibility across legacy versions of + Android. +

    -

    We're continuing to extend JobScheduler and GCMNetworkManager to meet more of +

    We're continuing to extend JobScheduler and GCMNetworkManager 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 JobScheduler and related APIs instead.

    -

    Take a look at the Background Optimizations documentation for details.

    +

    + Take a look at the Background + Optimizations documentation for details. +

    OpenGL™ ES 3.2 API

    @@ -591,7 +673,7 @@ href="https://www.khronos.org/registry/gles/extensions/ANDROID/ANDROID_extension

    The framework API for OpenGL ES 3.2 on Android N is provided with the GLES32 class. When using OpenGL ES 3.2, be sure to declare the -requirement in your manifest file, using the <:uses-feature> tag and +requirement in your manifest file, using the <uses-feature> tag and the android:glEsVersion attribute.

    For information about using OpenGL ES, including how to check a device's -- cgit v1.2.3-59-g8ed1b