CrashReporter

external interface CrashReporter(source)

Functions

Link copied to clipboard
abstract fun addExtraParameter(key: String, value: String)

Set an extra parameter to be sent with the crash report. The values specified here will be sent in addition to any values set via the extra option when start was called.

Link copied to clipboard

The date and ID of the last crash report. Only crash reports that have been uploaded will be returned; even if a crash report is present on disk it will not be returned until it is uploaded. In the case that there are no uploaded reports, null is returned.

Link copied to clipboard

The current 'extra' parameters of the crash reporter.

Link copied to clipboard

Returns all uploaded crash reports. Each report contains the date and uploaded ID.

Link copied to clipboard
abstract fun getUploadToServer(): Boolean

Whether reports should be submitted to the server. Set through the start method or setUploadToServer.

Link copied to clipboard
abstract fun removeExtraParameter(key: String)

Remove an extra parameter from the current set of parameters. Future crashes will not include this parameter.

Link copied to clipboard
abstract fun setUploadToServer(uploadToServer: Boolean)

This would normally be controlled by user preferences. This has no effect if called before start is called.

Link copied to clipboard
abstract fun start(options: CrashReporterStartOptions)

This method must be called before using any other crashReporter APIs. Once initialized this way, the crashpad handler collects crashes from all subsequently created processes. The crash reporter cannot be disabled once started.