I develop android app but in some cases my app force close
How can I send email to developer contains details if force close
happen in any time ?
I develop android app but in some cases my app force close
How can I send email to developer contains details if force close
happen in any time ?
You can Use ready APi Such as BugSence and crittercism
After implementation SDK you will recive crush report with crush logs to your email if you whant
For BugSance Download SDK
Make sure you also add the line
to your app's AndroidManifest.xml file. BugSense uses this permission to send the crash reports and performance metrics.
add the BugSenseHandler in your activity before setContentView. Then you are ready to go!
The InitAndStartSession method installs the BugSense exception handler and the performance monitor. It then sends all the previously saved crash reports and performance metrics. At the same time, it starts a new session for your activity.
Here's an example on how to use the InitAndStartSession:
Whenever you want to explicitly start the session, you can use the startSession method at the onStart method of your activity, as follows:
Whenever you want to close the session, you can use the closeSession method as follows:
Close session will close the current session, offering better tracking of the sessions for your users.
If you want to manually flush all the saved data, use the BugSenseHandler.flush(Context) method:
More Documentation Android BugSence Doc
The ACRA library will fulfill your requirement. You just need to setup the email. The tutorial and setup is defined here.
Download the library with .jar in lib
You just need to define the Application class and write the following code just above application class and override
onCreate()
method like thisThats it. The email action will get opened whose body contains crash report.