DAN GALPIN: Android 8.1 Oreo contains a targeted set
of enhancements, including optimizations for Android Go
and a new Neural Networks API.
We've also included a few smaller enhancements
in response to user and developer feedback.
Android 8.1 includes memory optimizations for Android Go--
hardware that has one gigabyte or less of RAM.
For example, Notification Listener Service
and Condition Provider Service will not
be supported on low RAM devices.
In addition, we've added new hardware feature constants
so you can now target the distribution of your apps
and APK splits to normal or low RAM devices
if they're running Android 8.1 and later.
We've been working hard to bring on-device machine intelligence
to mobile with features such as Now Playing and Google Lens.
The new Neural Networks API lays the foundation
for our developer community to build
accelerated on-device applications
of machine learning, including image recognition
and prediction.
The Neural Networks API runtime is
designed to efficiently distribute the computation
workload across available on-device processors,
including dedicated neural network hardware, graphics
processing units, and digital signal processors.
For devices that lack a specialized vendor
driver or hardware, the runtime relies on optimized code
to execute requests on the CPU.
It's unlikely that most apps will use the Neural Networks
API directly.
They'll instead rely on a higher level
machine learning framework such as TensorFlow Lite or Caffe 2.
TensorFlow Lite is Google's cross-platform open source
framework designed to execute deep trained neural
networks in mobile environments, and it's
scheduled to be released soon, so make sure to stay tuned.
We also are investing bringing the benefits of deep learning
to more developers, so we intend to release a library
to make common ML use cases easily available
on mobile devices.
Android 8.1 Oreo adds a new Shared Memory API.
This new API enables the creation
of an anonymous shared memory instance.
You can mmap the shared memory object into a local byte buffer
and read and write it like any other byte buffer.
The memory protection can be controlled
on the shared object.
Since the shared memory object is parcelable,
you can easily pass it to another process through AIDL.
The remote process can then map any part
of the memory it wants, and once access is no longer needed,
just unmap the buffer.
The Shared Memory API also supports interoperability
with the NDK using a shared memory.
We can mmap the FD and then read and write.
It's a great way to share data between multiple processes,
within a single app, or even between apps.
We've added some polish and refinement to Autofill.
Most of the changes are on the Autofill service side.
For example, the Save UI now supports custom descriptions,
so when asking to save credit card data,
the service can request a displayable logo representing
the type of credit card, the last four digits of the card
number, and an expiration date.
This helps the user understand exactly what is being saved.
One minor change for apps that want to support Autofill
is that base adapter and its derived classes,
such as Array Adapter, now support
setting Autofill options.
This makes it easier to provide Autofill data for simple custom
adapters, such as one used to set credit card expiration
dates.
In Android 8.0, you would need to override the Get Autofill
method options in the adapter, but now in 8.1, you can just
call Set Autofill options.
And in another helpful touch, the API 27 version
of the support library view compat
now wraps the Autofill methods to make it easier
to give hints to the Autofill service, which you really
should do.
One more Autofill note--
consider setting up an association between your app
and your website.
This allows the Autofill service to share passwords
between the two, whether you run Android 8.0 or Android 8.1.
Android 8.1 includes the new APIs in the Wallpaper Manager
to get the most representative colors
from the current wallpaper.
And the system UI and Pixel launcher
will adjust the colors they use based upon this API.
If you've made a live wallpaper, you
notify the wallpaper service whenever your colors
change significantly, returning them in the On Compute Colors
method.
We recommend using the utility functions within the Wallpaper
Colors class to automatically select
these colors from a representative bitmap
or drawable.
Some other changes you might be interested in--
Edit Text now returns an editable rather than
a care sequence.
Your app can determine how it responds
to a known threat from the Web View implementation of the Safe
Browsing API.
The Media Metadata Retriever class
has a new method, Get Scaled Frame At Time,
that finds a frame near a given time position
and returns a bitmap with the same aspect ratio as the source
frame, but at the requested size.
If you have any Pixel or Pixel 2 device,
we support requesting A-audio sharing
mode exclusive in some cases, which
provides reduced audio latency.
Better yet, we've released a preview
of the Oboe library, which allows applications to target
A-Audio on API 26 plus devices and Open SL
on previous versions of Android to get the best
latency with a simplified API surface in a compatible way.
If you have a Pixel 2, you'll notice a developer setting
in Android 8.1 for Camera HAL HDR+.
This enables you to test an early version of HDR+ with
Pixel Visual Core, Google's first custom designed
co-processor for consumer products.
Note that HDR+ will only be enabled for specific Camera
and Camera2 API options.
If you have an eligible Pixel or Nexus device,
you can enroll it in Android Beta to get the latest update,
but we also have Android 8.1 emulator images.
This gives you the opportunity to fix any issues
and update your app before consumers
get their hands on 8.1.
You can find out more about everything we covered,
including the developer preview program here.
Happy coding.
[MUSIC PLAYING]