SPEAKER 1: Android Oreo is here and available to consumers.
Hopefully, you've taken the opportunity
to test and update your apps during the long preview process
so those influential, vocal early adopters have
a great experience.
Let's review what O brings- a chocolate sandwich cookie
of important structural changes with sweet new capabilities.
The most important stuff first.
You should keep in mind that even if your app doesn't yet
target O, it will behave differently on O in a few ways.
When your app is in the background, i.e.
without an active activity or foreground service,
location updates will be significantly less frequent.
When your app no longer has an active activity, service,
or other component any wake locks at hold
will be automatically released.
For devices that come with Google Play services,
settings not secured on Android ID
will return a different value for each app
based upon the sign-in key and user profile.
For advertising, you really need to be
using Google Play services user-resettable advertising ID.
Here's another privacy-related change.
Apps targeting O won't be able to get access
to user accounts using the get accounts permission.
Instead, apps must rely on the account user activity.
Account owners can now choose whether their accounts will
be visible to other apps and the account user activity
will be updated accordingly.
If you're targeting O, your app will have new limits
on background processing.
In summary, only a small number of broadcast
can be used to start your app, such as Boot Completed.
Also, your app will no longer be able to start services
when in the background.
You'll need to rely on explicit broadcast receivers, Jobs,
Firebase Cloud Messaging, and startForeground, a new API
to start foreground services.
Android Oreo adds features to support wide gamut displays,
including 16-bit PNG and ICC profiles,
JPEG, PNG, and WebP, along with new utilities
such as color space and color log.
Android O also supports a longer, narrower screens,
and apps that target Android O no longer
have a default maximum aspect ratio of 1.86.
If your activity needs to set a maximum aspect ratio,
the system will letterbox your app
if you set resizeable activity to false
and use the max aspect ratio attribute.
Of course, it's best to make your app work fullscreen
and with multi-window, so only use this as a last resort.
To make it easier to correct graphics driver issues,
Android O device manufacturers may
choose to update these drivers in the Play Store
without having to do a system update.
And of course, Android O is built on Project Treble, so
devices that ship with O will be easier
to update to new versions of Android in future.
Android Oreo gives users fine-grain control
over notifications by adding notification channels.
Apps can declare channels, which show up to users as categories.
Users can block a category and alter its behavior controlling
vibration, lights, and lock screen privacy.
Apps can target Android O must use channels
if they use notifications.
We call the notification manager to create notification channels
and then we set the notification channel ID
in the compact notification builder.
Android O also supports notification badging and dots
by default in a channel.
We can turn this off by setting set show badge to false.
Android Oreo now allows apps to request adding their AppWidget
to the launcher.
You can easily check to see if AppWidget pinning requests are
supported by the default launcher
and then have your app request them in your UI.
And we've changed the way adding shortcuts works,
eliminating the broadcast used in Android 7.1.
Similar to AppWidgets, you can check
to see if shortcut pinning requests are supported
and then have your app request them.
Picture in Picture is now available for all devices, not
just Android TV.
To specify if your activity can use PiP mode,
set Android [INAUDIBLE] supports Picture in Picture
to true in the manifest.
All an app has to do to start Picture in Picture
is call enter Picture in Picture mode
from a resumed or pause state.
Activities can now be launched by the app
on secondary displays using activity options, simpler
and easier than the presentation API.
In addition, activities that support multi-window
can be launched by a user on secondary displays.
These displays have per display based configurations
and resource management.
This means that some parts of the configuration,
such as screen width DP, screen high DP, layout, and density DP
will be set according to display on which the activity currently
resides.
Fonts now are a fully-supported resource type in Android O
and have also been back-ported to API 14
in the support library.
You can use the get font method to get a font by ID
and use these fonts directly in text views.
You can also define entire font families in XML,
declaring the font styles and weights,
along with the font resource.
Downloadable fonts are also supported in O
and implemented in the support library.
These fonts are shared between applications,
making better use of storage.
The 800 plus Google Fonts are now available directly
within Android Studio, where they
can either be embedded in your ABK
or set to download on-demand.
One of my favorite Android Oreo and support library features
is TextView AutoSizing.
You can create an array of preset text sizes
or set min and max sizes with a step granularity
and the text will grow and shrink to fill
the available text view space.
EditText can now be autofilled.
Much of this will happen automatically
but you can help the Autofill provider do a better
job by giving it hints.
You can also mark fields that Autofill should ignore.
Adaptive icon support in Oreo allows app developers
to control the way their icon appears
with launchers and devices that use different icon
shapes, with an additional layer that can
be used for animated effects.
Android Studio includes a new wizard
for creating adaptive icons.
And O has added support for fractional inset values
to make it easier to use legacy resources to build these icons.
Android has a new native audio API,
AAudio, designed for low latency tasks,
such as effects processing and real-time synthesis.
It's easier to use and adds a new direct mode
that if implemented by an OEM allows to reduce latency.
There's so much to discover in Android O, which also includes
updates to playback and recording,
seeking and reversing animator's sets,
multi-process web view is Safe Browsing,
StrictMode enhancements, seekable file descriptors
with media file access, more language support, and more.
Check out the links to learn more about Android Oreo
and how we're helping developers leverage key
features using the support library.
Also see how we're improving Android
development with the launch of [INAUDIBLE] support,
architecture components, and Android Studio 3.0.