FERGUS HURLEY: Hi, I'm Fergus Hurley,
a product manager at Google.
I'm going to show you how to use Android vitals to keep
an eye on your app's engineering performance metrics
so you can fix any problems that may affect your users.
Why is it important to track your engineering metrics?
Because when your app performs badly, users notice.
In fact, almost half of one-star reviews on the Play Store
mention performance issues, like app stability.
On the other hand, when things are running smoothly,
users are happy.
Android vitals tracks the metrics that
matter most to your users--
battery use, stability, rendering, startup time,
and permission requests.
Let's start with battery use, because it's probably
the most important of all.
Nobody wants to use an app that drains their battery.
So Android vitals reports on the four most significant causes
of battery drain--
wake locks, wakeups, background Wi-Fi scans,
and background network use.
Background partial wake locks are
when your app keeps the CPU running after the device's
display turns off.
It can become stuck, if it's held for a long time
while your app runs in the background.
This can drain the user's battery.
So you should use them sparingly and release them
as soon as possible.
The second cause of battery drain is excessive wakeups.
These let your app wake up a device
at a certain time, bringing it out of low-power mode,
and holding a partial wake lock, while the alarm executes.
Again, these can drain your user's battery.
And you want to use them as little as possible.
The last two battery-related metrics we track
are excessive background Wi-Fi scans and network use.
In both cases, your app connects to the internet
in the background, waking up the CPU
and turning on the radio, which is draining the user's battery.
If your app doesn't use any of these features,
then you will not see metrics in vitals for them.
Also, if your app does not have enough users above the privacy
threshold, then you will not see any data either.
So now that we've covered battery life,
the next most important area of Android vitals to focus on
is app stability.
We track two stability metrics, ANR events and crashes.
Application Not Responding, or ANR events,
are when your app stops responding to user input.
This happens when the UI thread of the app
is blocked for too long, so the user's app
appears to freeze on them.
Crashes occur when an unhandled exception or signal causes
your app to exit unexpectedly.
Of course, you'll want to keep both of these to a minimum.
Your Android vitals dashboard also
displays your app's rendering metrics.
Users want a fast, responsive application
that runs smoothly and doesn't lag or stall.
So we track any instances of slow rendering
or frozen frames.
Slow rendering is when your app can't render frames
in under 16 milliseconds.
When this happens, your app appears to stutter.
We call it jank.
Frozen frames occur when UI frames
take longer than 700 milliseconds to render.
This makes your app appear stuck and unresponsive to user input
for almost a second.
Users also expect your app to launch quickly.
On your Android vitals dashboard,
you can easily identify when your app is loading slowly
with different metrics for cold starts, warm starts,
and hot starts.
A cold start is when your app hasn't
been launched for a while and isn't in the device's memory.
This means the device needs to create and start all your apps
resources to get it running.
In this case, a slow start would mean 5 seconds or more.
A warm start is when your app is in memory
and simply needs to go from activity
launched to activity running.
In this case, a slow start would be 2 seconds or more.
Finally, a hot start is when your app and its activity
are in memory and your app goes from on restart
to activity running.
From a hot start, your app shouldn't take longer
than 1.5 seconds to load.
The last metric in your dashboard
is all about permissions.
Here, you'll see the percentage of people
who are denied a permission request made by your app.
If the level is high, you may need
to explain the reason for your request
or rethink whether you actually need that permission at all.
So how do know if your metrics are good?
On the dashboard, you'll see benchmarks for each vital
to help you understand how your app or game is performing
and which issues, if any, to prioritize.
For example, people expect board games to load faster
than racing games.
So your metrics will only be measured against similar apps.
Not sure what to focus on first?
Well, all your metrics are important to monitor.
We've highlighted the four most important ones
on your Android vitals dashboard--
ANR rate, crash rate, stock wake locks in the background,
and excessive wakeups.
We call these the core vitals.
Hopefully, your apps metrics all look good.
But if something should go wrong,
it's important to fix the problem as quickly as possible.
That's why Android vitals also provides anomaly detection.
Just click on the dashboard alert
to learn more about the problem.
Or you can sign up for Anomaly Alerts emails.
Addressing these issues as quickly as possible
not only keeps your users happy, it also
helps improve your app's profile in the Play Store,
such as it's discoverability in the search results.
Android vitals gives you the tools
to monitor your app's performance
and keep it running smoothly.
For more advice on how to address app issues,
check out our videos on stability and battery life.
You'll find the links in the video description.
To learn more about Android vitals and the rest of the Play
Console or for tips on how to grow your app or game business,
check out the Playbook app on Google Play.
Thanks for watching.