Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android. Best way to let the developer know of thrown exceptions

What is the most common way to handle an exception, after it was thrown. I don't mean what to do to come back from the exception, not close the Activity or whatever. What i mean is how to let the developer know of the error number, the StackTrace and other log files that got created from the exception?

What is the most common way to send these to the developer? Or is it not common to do so?

Do you ask the user to send an email, which contains this information? Do you implement a form of some kind, similar to the ones used on websites on the contact page, and send the information automatically?

How do developers approach this issue? I'd really like to get some feedback from the users, so i know where, and if, my app crashes, but i'm not sure where exactly to start.

like image 795
AndreiBogdan Avatar asked Jul 19 '12 14:07

AndreiBogdan


2 Answers

Check android.util.Log.

About how to manage the logs, it's up to you. You can send them to a server in the Activity.onDestroy() method, or specifically request them to the users reporting errors.

like image 52
m0skit0 Avatar answered Oct 19 '22 02:10

m0skit0


The Android OS has built-in functionality that helps you take care of this :)

When an Android app throws an unhandled exception, the OS automatically prepares the stack trace and asks the user if he or she would like to send it to the developer. If the user sends it, the developer can look the stack trace up in the developer console at http://market.android.com/publish.

like image 3
Kevin Avatar answered Oct 19 '22 02:10

Kevin