Dave Burke, Vice President of Engineering

Android 9 leverages artificial intelligence to make your phone smarter, simpler and more human. Check out all the new features of Android 9 in this article, and hopefully you’ll be able to take advantage of Android 9 to improve the overall performance and experience of your apps and bring them closer to your users!

During the development of Android 9, we have received over 1,000 bug and feature requests thanks to the positive feedback. More than 140,000 developers have tried out the developer preview through the Android Beta program, and seven of our top partner device vendors have launched flagship devices supporting the Android P Beta, helping us get feedback from early Beta users around the world.

Starting today, we will release the Android 9 source code as part of the Android Open Source Project (AOSP), and will begin pushing updates to Pixel users, with additional Android devices expected to be notified in the coming months.

We will continue to work hard to make Android the premier open platform for business success for developers around the world. We look forward to seeing you take advantage of the new Android 9 platform and the new features in Google Play to create great apps and games that will deliver great experiences to users around the world in the most efficient and safe way possible.

New features in Android 9 final release

Build smarter phones with machine learning at the core

Android 9 has powerful learning capabilities: The system can learn and adapt to the user’s habits and preferences during use — from strong battery life to personalized app recommendations, Android 9 can do everything you want to ensure a continuous and smooth user experience.

Dynamic power management

Working with DeepMind, we have launched dynamic power management features that use machine learning techniques to allocate limited resources to the system and focus more on the applications users use most frequently. If you’ve already optimized your application for low power consumption mode, application standby mode, and background limitations, it should work well with dynamic power management features. If you have not started the optimization work, please read the power management official document for detailed operation guide.

Slices

Slices are great for saving time, allowing users to access parts of an application without having to go through a full-screen experience. With accompanying UI templates, Slices are able to plug application content into multiple usage scenarios, such as Google Search and Assistant, in a highly dynamic, interactive manner. Learn more about how to build Slices in your application.

App Actions

App Actions is a new way to recommend apps. Developers can use this feature to make their apps available to more people and greatly increase user engagement. With machine learning, App Actions analyzes your application’s semantic intent and usage scenarios, and recommends your application to users when appropriate.

Text recognition with Smart Linkify

In Android 9, we extended our machine learning model for recognizing text to recognize information like dates or flight numbers with the help of the TextClassifier API. In addition, Smart Linkify allows developers to use text recognition modules through the Linkify API to perform multiple actions, such as suggesting actions that users can take. Smart Linkify has significantly improved the accuracy and speed of text recognition.

Neural network API 1.1

Android 9.0 has extended and improved the Neural network API to further optimize Android’s support for machine learning hardware acceleration. Neural network API 1.1 adds support for a total of nine new operators: Pad, BatchToSpaceND, SpaceToBatchND, Transpose, Strided Slice, Mean, Div, Sub, and Squeeze. TensorFlow Lite is a typical machine learning framework that already uses this API.

Human-computer interaction, it’s that easy

“Making smartphones smarter” is an important step forward. However, how to grasp the relationship between users and technology — let technology put people first, this is also critical. In Android 9, we significantly improved the user interface to make it simpler and easier to use. For developers, these changes make it easier for users to find, use, and manage your applications.

New system navigation

After more than a year of work, Android 9 has a new navigation system that makes it easier to switch between tasks and explore related apps. You can swipe up to get a full-screen preview of your recently used app, and tap to switch to the app of your choice.

Concave screen support

With the addition of a notch screen support, Android 9 allows your apps to take advantage of the latest full-screen features to showcase their unique appeal. The feature works seamlessly in most apps, with the system adjusting the height of the status bar to separate app content from the gap area of the screen. If your application contains immersive content, you can call the display Cutout APIs to confirm the shape and location of the notch, and then request a full-screen layout around the notch. In addition, we’ve added a developer option to simulate the shape of a notch on any device, greatly simplifying the process of building and testing applications that support a notch screen.

— Apps with immersive content can be displayed in full screen on notch devices

Notification and intelligent reply

Android 9 further improves the usability and operability of notifications. Messaging apps can call the new MessagingStyle API to display conversations, attach photos and emojis, or offer smart response suggestions. In the near future, you will be able to use ML Kit to generate smart responses in your applications.

In MessagingStyle notifications, you can display conversations and smart replies (left) or add pictures and emojis (right)

Text magnifier

A text Magnifier widget has been added to Android 9 to improve the user experience with text selection. Because the amplifier provides a text magnification panel that can be dragged over text, it helps users precisely locate the cursor or text selection handle. This feature can be applied flexibly to any view attached to a window, and personalized widgets and custom text rendering are good scenarios. Moreover, the amplifier tool can provide a larger version of any view or interface, not just text.

New text feature in Android P
Precomputed Text

User security and privacy

Unified Authentication dialog box

Biosensors are widely used for authentication. To ensure a consistent experience across sensors and applications, Android 9 introduces a unified authentication dialog that prompts users to perform actions. Applications no longer need to design their own dialogs, but instead trigger system dialogs by calling the BiometricPrompt API. In addition to fingerprint recognition (including off-screen fingerprint recognition), the API also supports face recognition and iris recognition.

High confidence user confirmation

Android 9 has added Android Protected Confirmation, which ensures that the prompt text has been confirmed by a real user through a trusted execution environment (TEE). Only after the user has successfully confirmed, TEE will issue the text for the application to proceed with the subsequent validation steps.

Strengthen key security protection

We have also added a new KeyStore class, StrongBox, with apis to support devices that provide anti-intrusion hardware measures such as separate CPUS, memory, and secure storage. You can set up KeyGenParameterSpec to decide whether to store the key to the StrongBox security chip.

DNS over TLS

Android 9 provides built-in support for DNS over TLS: If the NETWORK DNS server supports DNS query, the device automatically upgrades DNS query to TLS query. Users can manage DNS over TLS behavior by changing the Private DNS mode under Network and Internet Settings. To run a DNS query application by calling the new LinkProperties. IsPrivateDnsActive () API to obtain DNS model related information. Please read Android P Developer Preview support for DNS over TLS for further information.

HTTPS is used by default

In order to progressively migrate all network traffic from plaintext (unencrypted HTTP) to TLS, we changed the default Settings of the network security configuration to block all plaintext traffic, forcing applications to establish network connections over TLS unless the developer explicitly allows a specific domain name to use plaintext.

Compilers based security mitigation

Android 9 will further extend security mitigation at the compiler level and further enhance platform security with run-time hazardous behavior monitoring. Android 9 addresses code reuse and arbitrary code execution with control Process integrity (CFI) technology, and extends the use of CFI in media frameworks and other critical security components, such as NFC and Bluetooth. Android 9 also adds CFI kernel support for LLVM compilation of common Android kernels.

Android 9 also expands the use of the Integer Overflow Sanitizer to other libraries to mitigate both memory corruption and information leakage. We increased the priority of the inspector for libraries that 1) had historical vulnerabilities and 2) needed to handle complex and untrusted input, including libraries like Libui, libnl, and libMediaPlayerService.

User privacy

Android 9 adds a number of new mechanisms to further enhance user privacy protection. The system disables all idle applications from accessing the microphone, camera, and all SensorManager sensors. When an application’s UID is idle, the microphone will report “no audio signal,” the sensor will stop reporting events, and the camera used by the application will disconnect and generate an error when the application tries to access it. In most cases, these limitations do not cause new problems for existing applications, but it is recommended that you remove such sensor requests from your applications.

Android 9 also gives users control over whether to allow access to the platform build.serial identifier (which is protected by the READ_PHONE_STATE privilege). The ability to directly access this identifier has been deprecated since Android 8.0. You can call the build.getSerial () method to access the build.Serial identifier.

Understand all privacy changes

Sensory new experience: video and audio comprehensive upgrade

Multi-camera API and other improvements

Starting with Android 9, you can access video streams simultaneously from two or more physical cameras on devices that support a multi-camera API; On devices with dual front-facing or dual-rear-facing cameras, enable innovative features such as seamless zoom, bokeh, and stereoscopic vision that cannot be achieved with a single camera. The API also allows you to invoke logical or mixed camera video streams that can automatically switch between two or more cameras.

Other camera improvements include new Session parameters to effectively reduce latency during initial capture, and Surface sharing technology to allow camera clients to process scenes without restarting the video stream. In addition, we have added apis that provide access based on screen flash support and OIS timestamps.

HDR VP9 video and HEIF image

Android 9 adds built-in support for HDR VP9 Profile 2. You can now share hDR-enabled video content with your users on HDR-enabled devices.

In addition, we are adding platform support for HEIF (HEIC) image encoding. HEIF is a popular compression format, which improves image compression and reduces image storage space and network traffic. The introduction of platform support makes it easier for developers to transfer and use HEIF images from backend servers. Once you determine that your application is compatible with the data format for sharing or display, try setting HEIF as the storage format for in-app images. In addition, you can convert JPEG files to HEIC files through ImageDecoder, or get bitmaps from JPEG files through the Bitmap Factory. You can also use the HeifWriter in the AndroidX library to write HEIF static images from YUV byte buffers, surfaces, and bitmaps.

Enhance audio with dynamic processing

Developers can call the Dynamics Processing API to process audio on the fly, improving the audio quality of their apps by isolating sounds at specific frequencies, reducing the volume that is too high, or enhancing the volume that is too low. For example, even if the speaker is quiet, far from the microphone, and the environment is noisy, your application can capture and optimize his or her voice effectively. The API provides multi-field, multi-band dynamic processing effects, including a pre-equalizer, a multi-band compressor, a post-equalizer, and a series volume limiter.

ImageDecoder for bitmaps and drawable

The ImageDecoder API gives developers an easier way to decode images into bitmaps or drawables. ImageDecoder allows you to create bitmaps or drawable from byte buffers, files, or URIs. It has several advantages over BitmapFactory: support for accurate scaling, support for single-step decoding to hardware memory, support for post-decoding, and animation image decoding. Please obtain further information

Network connection and location

Use Wi-Fi RTT for indoor positioning

Android 9 adds platform support (also known as Wi-Fi Round-trip time, or RTT) for the IEEE 802.11MC Wi-Fi protocol, which allows you to use indoor location functionality in your applications. On hardware supported Android 9 devices, when location services are enabled and the “Allow geolocation information” option is checked, the application can use the RTT API to measure the distance to a nearby Wi-Fi access point (AP). Devices do not need to be connected to the AP to use RTT, and for privacy, only the phone can determine the distance, not the AP.

Cost sensitivity of data in JobScheduler

JobScheduler is a core Android service that helps you schedule tasks in low-power mode, application standby mode, and background constraints. In Android 9, JobScheduler can better assist users with network-related tasks and coordinate with network status signals provided separately by carriers. Tasks can now declare estimated data volumes, signal prefetch, and specify detailed network requirements — operators can report whether the network is congested or unmetered, and JobScheduler manages jobs based on network status. For example, when the network is congested, JobScheduler may defer large network requests; When the network can be used without metering, a variety of preloading jobs (for example, prereading titles) can be run to improve the user experience.

Open Mobile API for NFC payments and secure transactions

Android 9 adds an implementation of the GlobalPlatform Open Mobile API to the platform. On supported devices, applications can use the OMAPI API to access security elements (SE) to enable secure services such as smart card payments. The Hardware Abstraction layer (HAL) provides the necessary API for enumerating the many Secure Elements available (eSE, UICC, etc.).

Stronger performance

ART Performance improvement

Android 9 uses the ART runtime to significantly improve application performance and efficiency. We extended ART’s use of execution characteristics to optimize the application and reduce the memory footprint of compiled application code. ART can now use signature file information to rewrite DEX files on devices, helping to reduce memory footprint for several common applications by up to 11%. We expect this to reduce DEX memory usage on the system and speed up application startup time.

Kotlin optimization

Kotlin is a first-class programming language for Android development, so if you haven’t tried it yet, what are you waiting for? We made a long-term investment in Kotlin performance and continued to increase support for Kotlin, such as optimizing Kotlin code performance. In Android 9, you can see that this work is starting to pay off — we’ve improved some compiler optimizations, especially those for loops, for better performance. We will also continue to work with JetBrains to optimize the code generated by Kotlin. Just keep the Kotlin plug-in updated on Android Studio and you’ll get all the latest Kotlin performance updates.

Today, we also released an updated API in Android 9 — THE API 28 SDK (Rev.6) — that adds nullability annotations to some of the most commonly used apis. Stay tuned for more details in the near future.

Modern Android

With Android 9, we continue to invest significant resources to further build a more modern Android platform and running applications to advance our long-term goals of security, performance, and stability.

We announced last year that Google Play would require all apps to be updated for Android Oreo (Target DkVersion 26 or higher) by November 2018. Therefore, if the target platform version of your application is earlier than Android 4.2 (API level 17), the system will pop up a warning dialog box when the user installs your application. Please read the documentation related to the migration guide. We look forward to your application taking full advantage of modern Android to bring a better user experience.

Simple steps, can be used

Since Pixel users can start using Android 9 today, and other devices will be receiving updates over the next few months, adapt your apps to Android 9 as soon as possible. You only need to install and test your current app on an Android 9 Beta device or emulator using Google Play. Make sure your app runs smoothly, looks good, and handles Android 9 behavior changes properly.

Also, be aware of applications that call non-SDK interfaces. Android 9 limits access to certain non-SDK interfaces, so you need to reduce your application’s dependence on these interfaces. Please read the subsequent updates | to reduce the use of the SDK interface in order to enhance stability “, for details.

Once the necessary updates are made, we recommend that you immediately publish your app to Google Play without changing the target platform version of your app. This will help you continue to leverage the Android 9 API to optimize your application performance and migrate it over time to the target platform, while preserving the user experience.

Take advantage of Android 9 features and apis to further optimize your application

When you’re ready, feel free to explore Android 9 and take advantage of the new features and apis to make your application the best it can be.

First, download the official API 28 SDK, the latest development tools and image files to Android Studio 3.1, or use the latest Version of Android Studio 3.2. Then update the project’s compileSdkVersion and targetSdkVersion to API 28. After changing the target platform version, make sure your application supports any behavior changes.

When you are ready, please publish the APK update to Google Play. We recommend that you use the beta testing feature in Google Play to get early feedback from a small number of users before moving to full release.

Visit the Android 9 website to read the documentation and learn more. Check out the video or head over to the Google I/O Android playlist to see what Android 9 has in store for developers.

Upgrade your device now and try Android 9

Starting today, Pixel devices will be getting updates to Android 9.

Other devices joining the Beta program, such as Sony, Xiaomi, HMD, Oppo, Vivo, OnePlus, and Essential, as well as all eligible Android One devices, are expected to receive updates in late fall. At the same time, we are working with other partners to release additional Android 9 devices or upgrade existing devices to support the new system this year.

In addition, system images for Pixel devices are now available for download

Check out the Android 9 section of the Android Open Source Project Library for more Android 9 related resources.

The next step

With the release of Android 9, the developer preview is officially over. We will be closing the preview error channel soon, but please keep giving us feedback! If you experience any problems with Android 9, please submit a new bug report through the AOSP feedback feature.

In addition, we plan to slow down the Android Beta program and remove all models from the program. If you want to continue playing with the preview Android on Your Pixel device, click here to sign up for more information about the project.

“Thank you again for your support of the preview and open beta. Every developer and early adopter has contributed to making Android 9 a great platform for developers and users alike. Thank you!”

Click here to go to the “Android Developers Official Documentation” for more information