Skip to content

Instantly share code, notes, and snippets.

@osama-raddad
Created February 27, 2019 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osama-raddad/7edb894b8206ce6cc225ce9d86a6d0f8 to your computer and use it in GitHub Desktop.
Save osama-raddad/7edb894b8206ce6cc225ce9d86a6d0f8 to your computer and use it in GitHub Desktop.
class App : Application() {
override fun onCreate() {
super.onCreate()
FireCrasher.install(this, object : CrashListener() {
override fun onCrash(throwable: Throwable, activity: Activity) {
Toast.makeText(activity, throwable.message, Toast.LENGTH_SHORT).show()
// start the recovering process
recover(activity)
//you need to add your crash reporting tool here
//Ex: Crashlytics.logException(throwable);
}
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment