DAN GALPIN: Hello from the floor
of the 2019 Android Dev Summit,
and welcome back to
today's final session
of the #AskAndroid livestream.
I'm Dan Galpin, and this is
my co-host, Lyla Fujiwara.
Once again, we're
here to ask esperts--
experts questions that have
been tweeted to #AskAndroid
or asked in the live chat.
LYLA FUJIWARA: And
those esperts--
DAN GALPIN: Esperts.
LYLA FUJIWARA:
[LAUGHS] Those experts
are Chris Banes and Fred
Chung for your question asking
pleasure.
So Chris and Fred are both
Android developer advocates,
with Chris leading
advocacy around the system
UI changes in Android,
such as dark mode, which
I have a pin for up here--
CHRIS BANES: Woo!
LYLA FUJIWARA: Gesture nav.
On the other hand, Fred focuses
on privacy changes and China
developer outreach in general.
Welcome, Chris and Fred.
DAN GALPIN: All right.
So first question
for both of you,
what is your favorite
feature in Android 10?
FRED CHUNG: I'm going
to go with thermal API.
DAN GALPIN: Oh.
LYLA FUJIWARA: What is that?
FRED CHUNG: It's an API
that, on supported devices,
if it gets too hot, it's
an avenue for the OS
to tell the app that,
hey, I'm too hot.
Don't run high
performance stuff on me.
Let me cool down.
DAN GALPIN: All right.
That's a great
concession for game devs.
That's going to be awesome.
FRED CHUNG: Yeah, totally.
CHRIS BANES: So I
think, for me, it's
the headline feature
of dark theme.
We've tried to land
this feature now
for about four
years, every time.
You'll go to a developer option.
It'll be taken away.
We've finally got it landed,
so yeah, for me, dark theme.
LYLA FUJIWARA: Dark theme.
All right.
So speaking of dark
theme, Kimcy929
asks, "How to determine the
dark theme system enable?
I need to get it to change
the icon color of notification
actions, because
NotificationCompat doesn't
support changing the
background of custom
notification with remote
view automatically."
CHRIS BANES: Yeah, I mean,
with notifications, it's
the same process you
have for normal views.
So dark theme is a
configuration change.
So if you're using
values-night to be
able to vary those
resources, those drawables,
the resources system
will work automatically
with notifications.
It should just all work.
It's a little bit different
with custom layouts
and notifications.
But as long as you're using
the -night resource qualifier,
it should all work.
LYLA FUJIWARA: All right.
DAN GALPIN: All right.
Excellent.
All right.
So let's see.
This is interesting.
KennethL171 asked #AskAndroid,
with Jetpack security lib
and the AndroidX
biometric prompt lib,
will Google put more emphasis
in making use of the Android
keystore provider
and also making sure
that OEMs don't break
that functionality?
FRED CHUNG: Yeah, I
can take this one.
DAN GALPIN: Sure.
FRED CHUNG: In
general, we are trying
to improve the performance
of keystore providers.
And we'd like to, over time,
add more and more features
to the Android security library.
DAN GALPIN: Yeah, and I
mean, the tightened security
key is actually--
I mean, security chip-- is
actually a really big selling
point for our devices.
And I know, for a
lot of other OEMs,
there is a very
similar kind of focus
on both privacy and security.
FRED CHUNG: Right.
Yeah.
And we are obviously
working very closely
with different OEMs to make
that support more efficient.
LYLA FUJIWARA: OK.
So from Twitter,
this is a combination
of letters and numbers.
So bj20xy asks,
hey, Android team.
Is it OK to exclude
from the gesture areas
the sides of your carousels?
There are many apps out
there doing so already.
CHRIS BANES: Carousels are
a little bit of a weird one.
So it depends on how
you're using them.
We allow the gesture
exclusion APIs,
so they allow you to exclude
parts of the gesture zones,
and your app takes precedence.
The problem is that we
have limits on them.
So you can only limit
up to 200 dips per edge.
Carousels tend to be quite tall.
And so it depends on
what the content is.
If it's the primary use case of
your UI, then it's probably OK.
But if you tend to have
large lists of them-- say,
for instance, Play
Store, just similar UI--
it's probably not OK.
We kind of feel that users will
get used to where they swipe,
whereas in the
middle of the screen.
The actual edges for the
back gesture is 24 dips wide.
So it's not a huge area.
And we think users
just get used to it.
So yeah.
DAN GALPIN: Yeah, I've certainly
seen that in my own usage.
OK, let's see.
What do we have next?
Ah.
So Colin White asks, "When
implementing dark mode,
what's the recommendation around
using dark gray backgrounds
versus true black backgrounds?"
CHRIS BANES: Dark
gray versus black.
You might have [INAUDIBLE]
about this question.
So the material guidelines
have recommendation
of using dark gray.
And that's because you still get
the benefits of battery saving
and also a darkened theme
and don't have a harshness
that black backgrounds give.
The reasons why the
Pixel OS has black
is to have maximum
battery saving.
So that's the prime
reason why it does it.
Apps don't that really
have that issue.
So therefore, they
use a darker gray,
and it gives less of
a harshness and tends
to be better visually.
DAN GALPIN: All right.
LYLA FUJIWARA: OK.
So we had a couple of
questions about IMEI.
So I'm going to just
ask one of these.
FelipeC a bunch of
numbers asks, "Hi,
how can I get the IMEI
number in Android 10?"
DAN GALPIN: Yeah, and
we have a couple of--
another company was providing
smartphone insurance,
and they want to
get the IMEI number.
FRED CHUNG: Well, as people are
probably aware, in Android 10,
we started imposing the
restrictions for developers
and apps in general
to retrieve what
we call nonresettable hardware
identifiers for privacy
reasons.
So I think, for apps, it really
depends on the use cases.
If you wanted to, for
example, track daily
active users and
so forth, you can
use user ID, which is currently
available in the framework.
Or if you want to track
cross app installation
or uninstallation
attribution, for example,
you can use a SSAID,
Secure Setting Android ID.
Long name, but it's
available in the framework.
So yeah.
LYLA FUJIWARA: Yeah,
I was going to ask.
Can you talk a little
bit more about why
these changes were made?
FRED CHUNG: Yeah, yeah.
So like I said, the motivation
for imposing these restrictions
is to improve user privacy,
because we don't necessarily
want application owners
or developers to get
a hold of their users' hardware
identifier, which are largely
not resettable.
Because those are
rather permanent.
So we wanted to move towards
the mobile industry standard
where different mobile
assets in general
have adopted that practice.
So we wanted to move
the ecosystem forward
to become more privacy friendly.
DAN GALPIN: So Caiovmf asks,
"If a user sets a foreground
service notification to
Show Silently And Minimize,
can the service keep
running indefinitely?"
CHRIS BANES: Yes, they can.
Simple answer.
So yeah, it's up
to the user what
they do with that notification.
If they want to turn the app
to be silent and minimized,
that's their choice.
And it's up to them.
FRED CHUNG: Yeah, in
some cases, I would say,
if the application
developer has chosen
to add user controls
to the notification,
then the user in
those scenarios won't
be able to stop the foreground
services, for example.
LYLA FUJIWARA: OK.
I'm going to do this one here.
So Texta and a bunch
of numbers asks,
could a new app I build inherit
a dark theme from Android--
that is, in the styles?
Is there a style created which
could make my whole app dark
theme automatically?
CHRIS BANES: So yeah, we have
the DayNight variant of themes.
So appcompat added this
a number of years ago.
So yeah, if you're
using appcompat,
you already have this
feature in there.
It'll be called DayNight.
So yeah, look at the APIs.
We've had a number of blog posts
over the years, so look it up.
DAN GALPIN: So one
last quick question.
What happened to Bubbles?
CHRIS BANES: We weren't
quite happy with where
it landed, Bubbles, in terms
of the way apps could use it.
So we made it into
a developer option.
And that allows apps to actually
still play with the APIs
and get it working.
But we're not quite sure
how it's going to play yet.
It may come back
another Android version,
but we're not quite sure yet.
DAN GALPIN: All right.
Well, thank you so much.
LYLA FUJIWARA: So with
that, unfortunately, we're
almost just out of time.
But before we leave,
Chris and Fred,
if folks want to learn more
about any of these Android 10
features that you're talking
about, where should they go?
FRED CHUNG:
Developer.android.com/privacy.
LYLA FUJIWARA: [LAUGHS] OK.
CHRIS BANES: So for
me, gesture nav,
we've released a number
of articles on Medium.
And dark theme, as well,
there's a number of articles.
So yeah, look on Medium.
LYLA FUJIWARA: All right.
So follow us on
Medium, essentially.
DAN GALPIN: Android
Developers on Medium.
All right.
Well, I thank all of
you for joining us
from around the world for
this very first AskAndroid
livestream.
This concludes
today's broadcast.
We'll be back here tomorrow for
another edition of #AskAndroid
starting at 11:55 AM PST.
LYLA FUJIWARA: And
for me, as well,
thank you so much
for joining us.
And we will see you tomorrow.
In the meantime, do keep
tweeting us your questions
with the #AskAndroid hashtag.
And if you want a
deeper dive, go ahead
and subscribe to the Android
Developers YouTube channel.
[MUSIC PLAYING]
