Google Loads Android 8.1 With New APIs

Android 8 Oreo has hardly had a chance to gain a toehold in the market and yet Google has already brought forth an API-laden developer preview of Android 8.1. Here's what's buried inside.

Google surprised many this week by releasing a new version of Android. The Oreo-flavored variant of Android is still only available to a few devices (Google Pixel handsets) but that hasn't stopped Google from looking ahead. Android 8 includes lots of new goodies such as notification dots, autofill behaviors, and picture-in-picture. Android 8.1 looks to be a more developer-focused release with fewer user-facing features and more under the hood for app writers.

First up is the Neural Networks API. According to Google, this API "provides apps with hardware acceleration for on-device machine learning operations." It can handle on-device model creation, compilation, and execution, though Google suggests this isn't necessarily meant for applications as much as it its ML libraries and frameworks. It is meant to help developers train models before deploying them on Android smartphones and tablets. Google has some reference documentation available for the NNAPI here.

Next, Google is tweaking notifications again. Moving forward, apps will only be able to make a notification alert sound once per second. Google says sounds that exceed this rate will be lost. Other than the impact on alert sounds, this change doesn't alter the behavior of notification messages fed to the screen. This works in conjunction with the NotificationListenerService and ConditionProviderService.

The Android 8.1 API (level 27) will let developers more easily target devices with limited RAM. Developers can set their APKs to one of two hardware settings: FEATURE_RAM_LOW and FEATURE_RAM_NORMAL. This will divide the APK and send the appropriate package to devices that have low memory and those that have normal memory. This should improve the end-user experience via better performing apps.

The autofill framework introduced in Android 8.0 is already seeing several improvements in Android 8.1. API level 27 adds support for custom descriptions. This is a crucial security improvement. For example, it allows developers to hide or mask a credit card number (revealing only the last four digits) when filling out forms. The Preview makes it possible for developers to specify a Validator object the app can put to use to determine if autofill should be used in the first place. Other tools added to the autofill framework include the BaseAdapter for dynamically generating string representations, and the AutofillManager to help notify the framework about changes in the visibility of virtual structures. 

Google is always looking to improve the safety of those using Android devices. That's why Android 8.1 includes a new way to use the Safe Browsing API. When accessed through the WebView implementation, apps will be able to detect when WebView attempts to navigate to a known bad web site. WebView will generally show users an interstitial to warm them of the potential danger. The Safe Browsing API gives developers more ways to handle this situation, for example, controlling whether or not the app reports known threats to Safe Browsing or performs an action such as returning to safety.

The Shared Memory API is new and allows developers to create, map, and manage anonymous shared memory that can be used by multiple processes or apps. Google didn't provide much description beyond this, but documentation is available here.

The final new API in Android 8.1 is the WallpaperColors API. This tool appears to do nothing other than manage wallpapers. For example, it can create WallpaperColors objects from bitmaps, drawables, or using good old RGB designations. Lots of instructions are available for this one here.

Beyond these APIs, Android 8.1 includes a new management tool for fingerprint readers. Developers can use it to define actions to take when users fail too many times to log in via the fingerprint reader, such as lock or wipe the phone.

The Android 8.1 Developer Preview is available to a limited set of devices, including the Nexus 6p, Pixel, Pixel XL, Pixel 2, and Pixel 2 XL. Google has posted images for each of these devices so developers can manually flash the update. Alternately, those enrolled in the beta program should see an over-the-air download for Android 8.1 in the next few days.

 
Eric Zeman I am a journalist who covers the mobile telecommunications industry. I freelance for ProgrammableWeb and other online properties.
 

Comments

Comments(1)

Susan-James

Properly creator! I apprehend about your operating entice anyone who ever sees your article.

There are lots of individuals who each day post after writing on the various challenge but few writers who

create its cost whenever paintings on any challenge.