Advertisement
Android SDK

Android App Publishing: Reading Android Market Crash Reports

by

Developers who publish their applications on the Android Market need to pay careful attention to how well their applications work for users, or suffer from negative ratings. One very helpful way to track down problems with your published applications is to encourage users to file crash feedback and then review the feedback and fix the problems in a prompt fashion. Today we talk about how Android Market Crash logs are generated and what they mean.

Crash logs are a valuable resource for developers. They can be used to track down bugs, issues with specific devices, and other issues that make users unhappy with application performance. However, they are only available for published applications.


How is Crash Data Collected from the User?

When your application shuts down due to a crash, the user is shown a prompt that states that the application has stopped unexpectedly. The user has two choices: OK or Report, as shown:.

Screenshot showing crash report button for users

If the user hits OK, the application simply shuts down. However, if they choose to report the issue, a simple form comes up so the user can describe the event and send it in to the crash logs for the developer to review, as shown:

Screenshot showing what users get to fill out when submitting a report

As a Developer, where can I find the Crash Logs?

The crash logs are accessed through the developer's Android Market account—the same place you upload new applications and publish them. Once an application is published, users are free to report crashes they experience. These reports show up almost immediately for the developer to review. You can determine if you have any crash reports from the main Android Market listing. If your application has errors, they will be displayed as part of the listing. Here is a screenshot that shows a sample listing with crash log entries to review.

App listing showing crash report count

Note: Crash reports are only available to currently published applications. If you hit unpublish, your crash reports become unavailable at this time. Thus, if you're having a critical problem, copy the crash reports first, then unpublish to prevent more people from experience the problem.


Exploring the Application Error Report Overview

If you click on the error report for a specific application, you will see some general statistics about your application errors, such as freezes (shut downs due to lack of response) and crashes. As you can see from the screenshot below, this simple application has one new crash to be reviewed. You can also see statistics such as how many freezes and crashes your application is having in the field per week.

App listing showing crash report count

Reviewing the Specific Error

Click on the specific error to see more details about what happened. For this tutorial, we manufactured a specific error. That is, the application launches and immediately throws the following exception:

throw new Error("Whoops");

If you click on the specific error, you will see what method the error occurred in, how many times it has been reported, and the weekly numbers for that particular error, as shown here:

Error summary, including count this particular occurrence

Drilling down to the Stack Trace

If you continue to drill down on the error, you will find more detailed information about the crash. For example, that an Error exception was thrown in the source method called forceError(). This is, indeed, what occurred. You can also see the stack trace (in this un-obfuscated version of the app). Note the java.lang.Error: Whoops on the first line, as shown in this screenshot:

Stack trace of crash report

Note: If you obfuscate your code using ProGuard, you will need to use the retrace tool to read these stack traces. This tool is available as part of the Android SDK tools for download.

From this screen you can also mark the error as old (meaning you have reviewed it). You can also toggle to show the user messages (form data) associated with these errors.


Toggling to the User Messages

If you click the Show user messages link on the stack trace screen, you will be able to see the descriptions of the errors sent in by users, as shown in the screenshot below. In some cases, this might be helpful information, while in others, they may just yell at you for publishing apps with bugs. :P

User messages with error reports

From this screen you can also mark the error as old (meaning you have reviewed it). You can also toggle back to the stack traces by clicking on the Show stack traces link.


Conclusion

Android Market crash reports provide developers with useful information about their applications. Crash reports are not generated automatically. The user must choose to report the error. The application must be installed through the Android Market for this feature to work properly. Crash reports contain error information including stack traces as well as user-generated descriptions of what occurred. Review your crash reports frequently to stay ahead of any problems your application is having in the field and update your application in a timely manner-before your ratings tank!

About the Authors

Mobile developers Lauren Darcey and Shane Conder have coauthored several books on Android development: an in-depth programming book entitled Android Wireless Application Development and Sams Teach Yourself Android Application Development in 24 Hours. When not writing, they spend their time developing mobile software at their company and providing consulting services. They can be reached at via email to androidwirelessdev+mt@gmail.com, via their blog at androidbook.blogspot.com, and on Twitter @androidwireless.

Need More Help Writing Android Apps? Check out our Latest Books and Resources!

Buy Android Wireless Application Development, 2nd Edition  Buy Sam's Teach Yourself Android Application Development in 24 Hours  Mamlambo code at Code Canyon

Related Posts
  • Code
    Mobile Development
    Pulse.io: The Need for Speed7d4d1 preview image@2x
    As mobile developers, we need to make sure that our apps are fast and performant. In this post, we take a look at Pulse.io, a service that monitor your app's performance and tells you exactly how you can improve it.Read More…
  • Code
    Marketing
    How to Price Your App: Free or PaidDi7fc preview image@2x
    In this article, I'll talk about the different business models of mobile applications and which one is the right choice for you.Read More…
  • Code
    Ruby
    Writing Robust Web Applications - The Lost Art of Exception HandlingRails education retina preview2
    As developers, we want the applications we build to be resilient when it comes to failure, but how do you achieve this goal? If you believe the hype, micro-services and a clever communication protocol are the answer to all your problems, or maybe automatic DNS failover. While that kind of stuff has its place and makes for an interesting conference presentation, the somewhat less glamorous truth is that making a robust application begins with your code. But, even well designed and well tested applications are often lacking a vital component of resilient code - exception handling.Read More…
  • Code
    Android SDK
    Android SDK: Publishing and ReleasingAndroid preview@2x
    From the start of this series, we've been learning about creating Android applications. So far, we've focused on the development aspect as well as the tools you use to design, build, run, and test your applications. In this tutorial, we'll look at the process of distributing an application through the Google Play store. Of course, you need to make sure that your applications have been tested and debugged thoroughly before you get to this stage.Read More…
  • Code
    Ruby
    5 Reasons Why New Relic Is a Developer's Best FriendGetting started new relic retina preview2
    Once you start digging around New Relic you begin to realise just how many interesting features the service has to help monitor the performance and health of your application. It was truly difficult to pick just five things to talk about, so rather than focusing on the obvious features let's look at some of the less hyped functionality that New Relic provides and how we can use it in interesting and sometimes unorthodox ways. When we left you last time, we had a basic 'Hello World' Rails application (called New Relic_rails1, living in ~/project/tmp/New Relic). We will continue using this app, extend it and see if we can use it to demonstrate the features of New Relic that we'll be looking at.Read More…
  • Code
    Android SDK
    What's Happening in Android: Google I/O and the Developer ConsolePreview android@2x
    From Android Studio to the recent changes made in the Google Play Developer Console, the last few months have revealed a load of big changes for developers working on Android applications! This article provides an overview of what you need to know to keep up! Read More…