class CrashReporter
(source)
A generic crash reporter that can report crashes to multiple services.
In the onCreate()
method of your Application class create a CrashReporter
instance and call install()
:
CrashReporter(
services = listOf(
// List the crash reporting services you want to use
)
).install(this)
With this minimal setup the crash reporting library will capture "uncaught exception" crashes and "native code" crashes and forward them to the configured crash reporting services.
enum class Prompt |
|
data class PromptConfiguration
Configuration for the crash reporter prompt. |
CrashReporter(services: List<CrashReporterService>, shouldPrompt: Prompt = Prompt.NEVER, enabled: Boolean = true, promptConfiguration: PromptConfiguration = PromptConfiguration(), nonFatalCrashIntent: PendingIntent? = null)
A generic crash reporter that can report crashes to multiple services. |
var enabled: Boolean
Enable/Disable crash reporting. |
fun install(applicationContext: Context): CrashReporter
Install this CrashReporter instance. At this point the component will be setup to collect crash reports. |
|
fun submitReport(crash: Crash): Unit
Submit a crash report to all registered services. |