MALE SPEAKER: Welcome to what's new in N-- not the real name.
FEMALE SPEAKER: But we can talk about all
of the new features added in this version of Android.
For example, Marshmallow brought you Doze and App Standby,
and now N is bringing new Doze again.
But it's so much more.
The goal here is to coalesce back on activity whenever
the screen is off and not necessarily
when the device is stationary.
So this brings Doze out of the "tablet on a shelf" model
and into the "user out about and needs her battery" scenario.
So shortly after the screen is turned off,
Doze will be activated, and all network access and background
jobs will be restricted into maintenance windows that
happen every "N" minutes.
But in this lighter wait mode, alarms, wake clocks,
and Wi-Fi scans will all happen normally,
and all of the other Doze best practices still apply.
Cloud messaging.
Of course, this is all an extension of Doze mode.
So if the device is stationary, then
the Marshmallow-flavored Doze will kick in.
MALE SPEAKER: If you're actually using your device,
there's also a ton of cool new features,
like two apps on screen at the same time.
That's right.
Smartphones and tablets will support split screen windows,
where two apps are placed right up next to one another.
Now this doesn't change the usual activity lifecycle,
though.
There's still only one app that's resumed at a time.
The other app will be paused and not stopped,
so it should be able to update you with new messages
and keep a video playing, for instance.
There's a new resizable activity attribute
you add to your manifest entry to control how you work
with multiple window mode and also attributes
for setting a minimum size.
There's also a fancy new LAUNCH_ADJACENT intent flag
to hint that you'd like the launched activity to be opened
alongside the current activity.
And there's a little something extra for Android TV users--
Picture-in-Picture.
Now your app can continue to run in miniature form
on top of everything else.
Of course, that means you should hide
things that are totally unreadable
in Picture-in-Picture.
There's new callbacks for when you enter and leave
this mode if you choose to support it,
which you should, particularly for video apps out there.
FEMALE SPEAKER: So yeah, multi-window wins the day.
But there are so many new features
that have nothing to do with the UI,
like Data Saver, which was introduced on a per-app basis
a while back so that the user can specify
certain apps to be Wi-Fi only and keep their data costs down.
But with N, we added a device-wide option.
This means your app really needs to be good at not wasting data
and at failing gracefully if you cannot access the network right
now.
So to help you, we added an API call
so you can check if your app is network restricted
and maybe try a header to let the user know your app is
in "save data" mode.
MALE SPEAKER: One of the most noticeable things in Android N,
particularly for end users, is going
to be the total visual redesign of notifications.
Yup, all the standard templates have
changed quite significantly.
You'll also notice some of the features
from Android Wear are being expanded upon
and making their way onto other Android devices.
For example, you'll be able to use
remote input to send replies directly
from the notification shade.
You'll also be able to show the sent message
history in the notification, so you'll always
know exactly where you left the conversation.
Now grouping notifications make it a lot easier
to handle multiple notifications from the same app
by creating a single summary notification now allowing users
to expand it into individual actionable and dismissable
notifications.
Grouping is enabled by default on all app,
but you'll want to customize the summary
notification to make for a great notification experience.
FEMALE SPEAKER: Speaking of making things great for users,
encrypting your phone is great and secure and awesome,
but it does mean that you have to be
around to help it boot up.
So if your phone restarts while you're sleeping,
your alarm clock has died as well.
Direct Boot will allow the device
to fully wake up, to have alarms, and to receive calls.
This way, users won't be stuck in alert,
and then they can put in their password
when they go to use their device.
But it also means that if your app handles calls or SMS
messages, uses TalkBack, or triggers an alarm,
you will now need to be crypto aware, which means state it
in your manifest when targeting N,
and you will need to specify which files should
be device encrypted or credential encrypted
so that you can receive special treatment.
MALE SPEAKER: And speaking of special treatment,
Marshmallow brought permissions requests to the user in context
with run time permissions.
But for storage, taking it a step farther,
instead of having to request access to everything,
apps can now request access to a specific folder, such as Alarms
or Pictures, with full support for both internal and removable
media volumes.
FEMALE SPEAKER: Also, heads up.
Some of your implicit broadcasts are changing.
As part of our continued focus on Project Svelte,
we want to make background activity even more efficient.
So all apps targeting the N that listen for connectivity action
broadcasts in their manifest and rely
on it to launch their process will no longer be woken,
because a single network switch can result in a bazillion
apps all waking up when maybe two of them
will actually do something.
And this is horrible for performance,
and the time has come to fix it because "perfmatters."
However, if your app is already running,
it can still receive this broadcast
with context registerReceiver.
But as of N plus, you will no longer
be able to send or receive a new picture or new video broadcast.
Instead, JobScheduler has been extended to trigger jobs
on a constant provider update, which is a much better way
to handle a response to a picture being taken
and which means users won't wonder why the camera app keeps
freezing.
Time to migrate to JobScheduler.
But if you're afraid of JobScheduler, just tweet me.
We can chat.
Android N also allows users to specify multiple locales
and settings, which means apps can all
show search results in multiple languages
or avoid offering translations for languages
that the user already knows.
So the full list of locales for a user
can be accessed via Localelist_getDefault.
MALE SPEAKER: So check out the links in the description
for everything, and I mean everything
you need to know about Android N-- ot the real name.
Not-- not yet.
[MUSIC PLAYING]