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 = ACRAConstants.DEFAULT_STRING_VALUE,     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
fun CoreConfiguration(    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 = ACRAConstants.DEFAULT_STRING_VALUE,     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())

Functions

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

checks if the corresponding plugin is enabled

Properties

Link copied to clipboard
val additionalDropBoxTags: List<String>

Custom tags to be included in DropBox event collection

Link copied to clipboard
val additionalSharedPreferences: List<String>

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
val alsoReportToAndroidFramework: Boolean = false

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
val applicationLogFile: String

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

Link copied to clipboard
val applicationLogFileDir: Directory

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

Link copied to clipboard
val applicationLogFileLines: Int

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
val attachmentUriProvider: Class<out AttachmentUriProvider>

Allows attachmentUris configuration at runtime instead of compile time.

Link copied to clipboard
val attachmentUris: List<String>

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.

val deleteUnapprovedReportsOnApplicationStart: Boolean = true

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

Link copied to clipboard
val dropboxCollectionMinutes: Int = 5

DropBox event collection will look back this many minutes

Link copied to clipboard
val excludeMatchingSettingsKeys: List<String>

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
val excludeMatchingSharedPreferencesKeys: List<String>

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
val includeDropBoxSystemTags: Boolean = false

If enabled, DropBox events collection will include system tags:

Link copied to clipboard
val logcatArguments: List<String>

Arguments to be passed to the logcat command line.

Link copied to clipboard
val logcatFilterByPid: Boolean = true

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
val logcatReadNonBlocking: Boolean = false

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
val pluginConfigurations: List<Configuration>

Plugin configurations

Link copied to clipboard
val pluginLoader: PluginLoader

Allows custom plugin loading

Link copied to clipboard
val reportContent: List<ReportField>

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

Link copied to clipboard
val reportFormat: StringFormat

Format in which the report should be sent

Link copied to clipboard
val reportSendFailureToast: String? = null

Toast shown when report sending fails

Link copied to clipboard
val reportSendSuccessToast: String? = null

Toast shown when a report is sent successfully

Link copied to clipboard
val retryPolicyClass: Class<out RetryPolicy>

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

Link copied to clipboard
val sendReportsInDevMode: Boolean = true

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
val sharedPreferencesName: String? = null

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
val stopServicesOnCrash: Boolean = false

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

Extensions

Link copied to clipboard
inline fun <T : Configuration> CoreConfiguration.findPluginConfiguration(): T?
fun <T : Configuration> CoreConfiguration.findPluginConfiguration(c: Class<T>): T?
Link copied to clipboard
inline fun <T : Configuration> CoreConfiguration.getPluginConfiguration(): T

Allows easy access to Plugin configurations from the main configuration

fun <T : Configuration> CoreConfiguration.getPluginConfiguration(c: Class<T>): T