CoreConfiguration

class CoreConfiguration(val sharedPreferencesName: String? = null, val includeDropBoxSystemTags: Boolean = false, val additionalDropBoxTags: List<String> = emptyList(), val dropboxCollectionMinutes: Int = 5, val logcatArguments: List<String> = listOf("-t", ACRAConstants.DEFAULT_LOG_LINES.toString(), "-v", "time"), val reportContent: List<ReportField> = ACRAConstants.DEFAULT_REPORT_FIELDS.toList(), val deleteUnapprovedReportsOnApplicationStart: Boolean = true, val alsoReportToAndroidFramework: Boolean = false, val additionalSharedPreferences: List<String> = emptyList(), val logcatFilterByPid: Boolean = true, val logcatReadNonBlocking: Boolean = false, val sendReportsInDevMode: Boolean = true, val excludeMatchingSharedPreferencesKeys: List<String> = emptyList(), val excludeMatchingSettingsKeys: List<String> = emptyList(), val buildConfigClass: Class<*>? = null, val applicationLogFile: String? = null, val applicationLogFileLines: Int = ACRAConstants.DEFAULT_LOG_LINES, val applicationLogFileDir: Directory = Directory.FILES_LEGACY, val retryPolicyClass: Class<out RetryPolicy> = DefaultRetryPolicy::class.java, val stopServicesOnCrash: Boolean = false, val attachmentUris: List<String> = emptyList(), val attachmentUriProvider: Class<out AttachmentUriProvider> = DefaultAttachmentProvider::class.java, val reportSendSuccessToast: String? = null, val reportSendFailureToast: String? = null, val reportFormat: StringFormat = StringFormat.JSON, val parallel: Boolean = true, val pluginLoader: PluginLoader = ServicePluginLoader(), val pluginConfigurations: List<Configuration> = emptyList()) : Serializable, Configuration

Constructors

Link copied to clipboard
constructor(sharedPreferencesName: String? = null, includeDropBoxSystemTags: Boolean = false, additionalDropBoxTags: List<String> = emptyList(), dropboxCollectionMinutes: Int = 5, logcatArguments: List<String> = listOf("-t", ACRAConstants.DEFAULT_LOG_LINES.toString(), "-v", "time"), reportContent: List<ReportField> = ACRAConstants.DEFAULT_REPORT_FIELDS.toList(), deleteUnapprovedReportsOnApplicationStart: Boolean = true, alsoReportToAndroidFramework: Boolean = false, additionalSharedPreferences: List<String> = emptyList(), logcatFilterByPid: Boolean = true, logcatReadNonBlocking: Boolean = false, sendReportsInDevMode: Boolean = true, excludeMatchingSharedPreferencesKeys: List<String> = emptyList(), excludeMatchingSettingsKeys: List<String> = emptyList(), buildConfigClass: Class<*>? = null, applicationLogFile: String? = null, applicationLogFileLines: Int = ACRAConstants.DEFAULT_LOG_LINES, applicationLogFileDir: Directory = Directory.FILES_LEGACY, retryPolicyClass: Class<out RetryPolicy> = DefaultRetryPolicy::class.java, stopServicesOnCrash: Boolean = false, attachmentUris: List<String> = emptyList(), attachmentUriProvider: Class<out AttachmentUriProvider> = DefaultAttachmentProvider::class.java, reportSendSuccessToast: String? = null, reportSendFailureToast: String? = null, reportFormat: StringFormat = StringFormat.JSON, parallel: Boolean = true, pluginLoader: PluginLoader = ServicePluginLoader(), pluginConfigurations: List<Configuration> = emptyList())

Properties

Link copied to clipboard

Custom tags to be included in DropBox event collection

Link copied to clipboard

Add here your android.content.SharedPreferences identifier Strings if you use others than your application's default. They will be added to the ReportField.SHARED_PREFERENCES field.

Link copied to clipboard

Set this to true if you prefer displaying the native force close dialog after ACRA is done. Recommended: Keep this set to false if using interactions with user input.

Link copied to clipboard

To use in combination with ReportField.APPLICATION_LOG to set the path/name of your application log file.

Link copied to clipboard

To use in combination with ReportField.APPLICATION_LOG to set the root for the path provided in applicationLogFile

Link copied to clipboard

To use in combination with ReportField.APPLICATION_LOG to set the number of latest lines of your application log file to be collected. Default value is 100.

Link copied to clipboard

Allows attachmentUris configuration at runtime instead of compile time.

Link copied to clipboard

Allows to attach files to crash reports.

Link copied to clipboard
val buildConfigClass: Class<*>? = null

The default value will be a BuildConfig class residing in the same package as the Application class. You only have to set this option if your BuildConfig class is obfuscated.

Controls whether unapproved reports are deleted on application start or not.

Link copied to clipboard

DropBox event collection will look back this many minutes

Link copied to clipboard

Provide here regex patterns to be evaluated on each [android.provider.Settings.System}, android.provider.Settings.Secure and android.provider.Settings.Global key to exclude KV pairs from being collected. This allows you to exclude sensitive data from being collected.

Link copied to clipboard

Provide here regex patterns to be evaluated on each android.content.SharedPreferences key to exclude KV pairs from the collected SharedPreferences. This allows you to exclude sensitive user data like passwords from being collected.

Link copied to clipboard

If enabled, DropBox events collection will include system tags:

Link copied to clipboard

Arguments to be passed to the logcat command line.

Link copied to clipboard

Set this to true if you want to include only logcat lines related to your Application process. Note that this is always done by android starting with API 16 (Jellybean)

Link copied to clipboard

Set this to true if you want to read logcat lines in a non blocking way for your thread. It has a default timeout of 3 seconds.

Link copied to clipboard
val parallel: Boolean = true

Allow parallel collection. Increases performance but might pollute e.g. logcat output

Link copied to clipboard

Plugin configurations

Link copied to clipboard

Allows custom plugin loading

Link copied to clipboard

Redefines the list of ReportFields collected and sent in your reports.

Link copied to clipboard

Format in which the report should be sent

Link copied to clipboard

Toast shown when report sending fails

Link copied to clipboard

Toast shown when a report is sent successfully

Link copied to clipboard

Implement a custom RetryPolicy to decide if a failed report should be resent or not.

Link copied to clipboard

Set this to false if you want to disable sending reports in development mode. Only signed application packages will send reports.

Link copied to clipboard

Name of the SharedPreferences that will host ACRA settings which you can make accessible to your users through a preferences screen:

Link copied to clipboard

If you have services which might crash on startup android will try to restart them indefinitely. Set this to true to prevent that.

Functions

Link copied to clipboard
open override fun enabled(): Boolean

checks if the corresponding plugin is enabled

Link copied to clipboard

Allows easy access to Plugin configurations from the main configuration