Google Adds Fresh Round of APIs to Android P

Google has released the second developer preview of Android P and with it detailed a new set of APIs for the mobile Platform. Android P is an ambitious release from Google. While there are plenty of exciting user-facing features that will reach phones around the world, there's even more under the hood for developers. This week Google offered developers a new, more stable preview of Android P along with a refreshed Android Studio and more than a handful of new APIs. This is a quick breakdown of the new APIs on deck for Android P.

Android P introduces the TextClassifier API in order to help apps identify entities in content or text input. The API banks on Machine Learning to support more text types, such as dates and flight numbers. The new TextClassifier API, together with the updated Linkify API, can automatically create links and quick actions as people type to help them. Google says the updated Linkify API has significant improvements in accuracy and precision when it comes to detection and performance.

On the accessibility front, Android P has added a new Magnifier widget. This tool is meant to make it easier to select and manipulate text via the cursor. The Magnifier API is here to help. With it, developers can make sure the magnifier widget can be attached to any custom TextView, which opens up a variety of use cases for both the developer and the end users.

The Dynamics Processing API should help developers improve the audio effects in their apps. Android P introduces a new Dynamics Processing Effect in the Audio Framework that lets developers improve audio quality. Google says this lets developers isolate specific frequencies and lower loud or increase soft sounds to enhance the acoustic quality of their applications. The API gives devs access to a multi-stage, multiband dynamics processing effect that includes a pre-equalizer, compressor, and limiter. It lets devs modify the audio coming out of Android devices and optimize it according to use preferences or even the ambient conditions. 

Google says the new BiometricPrompt API replaces the FingerprintDialog API in Android P. THe new API provides a standard Authentication experience across a growing range of biometric sensors, such as fingerprint readers, iris scanners, and face recognition cameras. Google says the API creates a consistent, system-wide experience for prompting users to enroll biometric data for security purposes. Google wants developers to switch to the new BiometricPrompt API as soon as possible.

In the same vein, Android P adds StrongBox as a new KeyStore type. This offers API support for devices that provide key storage in tamper-resistant hardware with isolated CPU, RAM, and Flash. Google says developers should use the KeyGenParamterSpec to see if their keys should be protected by a StrongBox security chip.

These APIs join the initial batch of APIs added to Android P earlier this year, which include the WiFi Round-Trip-Time (RTT) API, DisplayCutout API, Multi-Camera API, GlobalPlatform Open Mobile API, and the Neural Networks API.

These APIs don't mark the limit of what's new for developers in Android P. There are tons of other tools built into the new platform for developers to put to use. Some of the new functions include Adaptive Battery and Adaptive Display for improved power management, App Actions and Slices for surfacing actions inside apps, smart reply in notifications, background app restrictions, and much more.

Google says developers should download the new SDK from Android Studio, which contains the new APIs, and get to work making their apps compatible with Android P.

The Android P Developer Beta 2 is available to the Pixel, Pixel XL, Pixel 2, Pixel 2 XL, Sony Xperia XZ2, Xiaomi Mi Mix 2S, Nokia 7 Plus, Oppo R15 Pro, Vivo X21UD and X21, and Essential PH‑1.

Be sure to read the next Mobile article: Do You Develop for Android? Google Just Updated Nearly Everything