Created
February 27, 2019 19:26
-
-
Save osama-raddad/7edb894b8206ce6cc225ce9d86a6d0f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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