I am developing android application. I want to send an email to myself whenever my app crashes on a device, so that I can find my application's crash report through email. How can I implement this concept in my app? Have any exception handler for it?
Find your data Select an app. On the left menu, select Quality > Android vitals > Crashes and ANRs. Near the center of your screen, use the filters to help you find and diagnose issues. Alternatively, select a cluster to get more details about a specific crash or ANR error.
You can view the details of each crash on the Error Reports page of the Steamworks Partner backend. Mini-dumps are always stored locally on the computer before they are uploaded to Steam. If you need to examine one directly, you should be able to find it in the games install directory.
I am catching un-handled exceptions by using this in my activity's onCreate()
:
mUEHandler = new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
try {
PrintWriter pw = new PrintWriter(new OutputStreamWriter(
openFileOutput(DMP_FILENAME, 0)));
e.printStackTrace(pw);
pw.flush();
pw.close();
} catch (FileNotFoundException e1) {
// do nothing
}
BaseActivity.this.finish();
}
};
Thread.setDefaultUncaughtExceptionHandler(mUEHandler);
This writes every unhandled exception in your app that happened on your activity to text file. Then you can analyze it.
I use ACRA http://code.google.com/p/acra/ to collect crash reports. Since these are collected into Google docs-based spreadsheet you can configure to be notified when that doc is updated
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With