Application Not Responding (ANR) is a type of error on Android that occurs when a user is unable to take action in an app for a prolonged period of time. If the app has not responded to an input event (e.g. key press, screen touch) within 5 seconds, the user is presented with a pop-up window asking if they would like to close the app or continue waiting.
Traditionally, mobile developers have had limited visibility into ANRs. For example, the Google Play Console only registers an ANR when the user is greeted with the pop-up window. The problem is that users have little patience for bad app experiences — users will force quit and uninstall apps before seeing the termation prompt for freezes lasting less than 5 seconds.
There are two main problems with the current state of ANR reporting:
- ANRs are frequently underreported. Mobile developers find themselves losing users without knowing why.
- ANRs lack data. The only data mobile developers have for an ANR is the final stack trace. More often than not, this is not enough information to solve the ANR.
In this post, we’ll cover how Embrace is the premier solution for identifying and solving ANRs by empowering mobile teams with earlier detection of ANRs alongside multiple stack traces to pinpoint the root cause.
Embrace enables earlier detection of ANRs
Embrace starts capturing ANRs as soon as the main thread is blocked for 1 second. We provide data on ANR Intervals (when the app hangs but eventually recovers) as well as ANR Exits (when an ANR is in progress when the user quits the app).
That means you can identify sessions where the app froze or stuttered but didn’t end with an ANR dialog. Sometimes apps have multiple short freezes that happen throughout a session. Or slow network calls that cause app hangs that lead to force quits but do not last long enough for Google Play Console to tag them as ANRs.
Embrace takes a more holistic approach in categorizing ANRs. If the main thread is locked for any significant amount of time, the user experience will suffer. By giving you better visibility into ANRs — regardless of duration — Embrace empowers you to identify and fix performance issues before they result in churn and lost revenue.
Embrace provides the data needed to solve ANRs
Embrace presents you with more actionable data in the following ways:
- Embrace captures a stack trace as soon as the main thread is blocked for 1 second.
- Embrace captures multiple stack traces every 100ms during an ANR.
By being able to access multiple stack traces, you can see what code your app was executing and how that evolved during the duration of the ANR. This enables you to find the root cause faster.
If you’d like to learn more, we dive even deeper into this topic in this blog post.
We encourage you to instrument your app with Embrace and see how our ANR monitoring makes your life as a developer easier. We know how frustrating these issues are, and we’re here to help you identify and solve them so you can ship better apps to happier users.
How Embrace Helps Mobile Teams
Embrace is a data driven toolset to help mobile engineers build better experiences. If you’d like to learn more about Embrace, you can check out our website or request a demo.
Or, you can dive right into how we can help your mobile teams:
Get started today with 1 million free user sessions.
Get started free