I recommend using ARCA https://github.com/ACRA/acra .
Include arca in your build.gradle - it uses the apache 2.0 license as of 10/29.
compile 'ch.acra:acra:4.9.0' //TODO: Apache 2.0 license https://github.com/ACRA/acra
In your class that extends the application, drop that above the class declaration.
@ReportsCrashes(mailTo = " someone@somewhere.com ", customReportContent = { ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.LOGCAT }, mode = ReportingInteractionMode.TOAST, resToastText = R.string.resToastText) //you get to define resToastText public class MyApplication extends Application {
Then override the following method from the same application class as:
@Override protected void attachBaseContext(Context base) { super.attachBaseContext(base);
source share