Usage

Usage instructions for the library no-kill
Initialise the library by adding the below to the application class of your project
Recommended to use application class if you want to catch all the possible crashes on your application
NoKill.init(crashHandler)
Your application class should look something like this
​
class App : Application() {
​
override fun onCreate() {
super.onCreate()
​
// initialise no kill
NoKill().init(object : CrashHandler {
override fun uncaughtException(t: Thread, e: Throwable) {
showToastOnUIThread(e.message)
}
})
​
​
}
​
​
fun showToastOnUIThread(message: String?) {
Handler(Looper.getMainLooper()).post {
Toast.makeText(
applicationContext,
message,
Toast.LENGTH_SHORT
).show()
}
}
}