Crash Handler
class CrashHandler(context: Context, defaultHandler: Thread.UncaughtExceptionHandler, activityToBeLaunched: Class<*>) : Thread.UncaughtExceptionHandler
Custom Thread.UncaughtExceptionHandler to handle uncaught exceptions in the app.
This handler launches a specified activity when a crash occurs, passing the exception details via an Intent, and then terminates the app.
Parameters
context
The application context used to launch the crash activity.
default Handler
The default uncaught exception handler to fallback on.
activity To Be Launched
The activity class to be launched when a crash occurs.
Constructors
Link copied to clipboard
constructor(context: Context, defaultHandler: Thread.UncaughtExceptionHandler, activityToBeLaunched: Class<*>)