CoreConfigurationBuilder

class CoreConfigurationBuilder(arg0: Context) : ConfigurationBuilder

Class generated based on AcraCore (Jun 6, 2021 5:00:24 PM)

Constructors

CoreConfigurationBuilder
Link copied to clipboard
fun CoreConfigurationBuilder(arg0: Context)

Functions

build
Link copied to clipboard
open override fun build(): CoreConfiguration
getPluginConfigurationBuilder
Link copied to clipboard
@NotNull()
fun <R : ConfigurationBuilder> getPluginConfigurationBuilder(c: Class<R>): R
pluginConfigurations
Link copied to clipboard
@NotNull()
fun pluginConfigurations(): List<Configuration>
pluginLoader
Link copied to clipboard
@NotNull()
fun pluginLoader(): PluginLoader
setPluginLoader
Link copied to clipboard
fun setPluginLoader(pluginLoader: PluginLoader): CoreConfigurationBuilder
Set a custom plugin loader.
setReportField
Link copied to clipboard
fun setReportField(field: ReportField, enable: Boolean): CoreConfigurationBuilder
Use this if you want to keep the default configuration of reportContent, but set some fields explicitly.
transformReportContent
Link copied to clipboard
fun transformReportContent(): List<ReportField>
withAdditionalDropBoxTags
Link copied to clipboard
fun withAdditionalDropBoxTags(vararg additionalDropBoxTags: String): CoreConfigurationBuilder
Custom tags to be included in DropBox event collection
withAdditionalSharedPreferences
Link copied to clipboard
fun withAdditionalSharedPreferences(vararg additionalSharedPreferences: String): CoreConfigurationBuilder
Add here your {@link android.content.SharedPreferences} identifier Strings if you use others than your application's default.
withAlsoReportToAndroidFramework
Link copied to clipboard
fun withAlsoReportToAndroidFramework(alsoReportToAndroidFramework: Boolean): CoreConfigurationBuilder
Set this to true if you prefer displaying the native force close dialog after ACRA is done.
withApplicationLogFile
Link copied to clipboard
fun withApplicationLogFile(applicationLogFile: String): CoreConfigurationBuilder
To use in combination with {@link ReportField#APPLICATION_LOG} to set the path/name of your application log file.
withApplicationLogFileDir
Link copied to clipboard
fun withApplicationLogFileDir(applicationLogFileDir: Directory): CoreConfigurationBuilder
To use in combination with {@link ReportField#APPLICATION_LOG} to set the root for the path provided in {@link #applicationLogFile()}
withApplicationLogFileLines
Link copied to clipboard
fun withApplicationLogFileLines(applicationLogFileLines: Int): CoreConfigurationBuilder
To use in combination with {@link ReportField#APPLICATION_LOG} to set the number of latest lines of your application log file to be collected.
withAttachmentUriProvider
Link copied to clipboard
fun withAttachmentUriProvider(attachmentUriProvider: Class<out AttachmentUriProvider>): CoreConfigurationBuilder
Allows {@link #attachmentUris()} configuration at runtime instead of compile time.
withAttachmentUris
Link copied to clipboard
fun withAttachmentUris(vararg attachmentUris: String): CoreConfigurationBuilder
Allows to attach files to crash reports.
withBuildConfigClass
Link copied to clipboard
fun withBuildConfigClass(buildConfigClass: Class<*>): CoreConfigurationBuilder
The default value will be a BuildConfig class residing in the same package as the Application class.
fun withDeleteUnapprovedReportsOnApplicationStart(deleteUnapprovedReportsOnApplicationStart: Boolean): CoreConfigurationBuilder
Controls whether unapproved reports are deleted on application start or not.
withDropboxCollectionMinutes
Link copied to clipboard
fun withDropboxCollectionMinutes(dropboxCollectionMinutes: Int): CoreConfigurationBuilder
DropBox event collection will look back this many minutes
withEnabled
Link copied to clipboard
fun withEnabled(enabled: Boolean): CoreConfigurationBuilder
withExcludeMatchingSettingsKeys
Link copied to clipboard
fun withExcludeMatchingSettingsKeys(vararg excludeMatchingSettingsKeys: String): CoreConfigurationBuilder
Provide here regex patterns to be evaluated on each {@link android.provider.Settings.System}, {@link android.provider.Settings.Secure} and {@link android.provider.Settings.Global} key to exclude KV pairs from being collected.
fun withExcludeMatchingSharedPreferencesKeys(vararg excludeMatchingSharedPreferencesKeys: String): CoreConfigurationBuilder
Provide here regex patterns to be evaluated on each {@link android.content.SharedPreferences} key to exclude KV pairs from the collected SharedPreferences.
withIncludeDropBoxSystemTags
Link copied to clipboard
fun withIncludeDropBoxSystemTags(includeDropBoxSystemTags: Boolean): CoreConfigurationBuilder
If enabled, DropBox events collection will include system tags:
  • system_app_anr
  • system_app_wtf
  • system_app_crash
  • system_server_anr
  • system_server_wtf
  • system_server_crash
  • BATTERY_DISCHARGE_INFO
  • SYSTEM_RECOVERY_LOG
  • SYSTEM_BOOT
  • SYSTEM_LAST_KMSG
  • APANIC_CONSOLE
  • APANIC_THREADS
  • SYSTEM_RESTART
  • SYSTEM_TOMBSTONE
  • data_app_strictmode
withLogcatArguments
Link copied to clipboard
fun withLogcatArguments(vararg logcatArguments: String): CoreConfigurationBuilder

Arguments to be passed to the logcat command line.

withLogcatFilterByPid
Link copied to clipboard
fun withLogcatFilterByPid(logcatFilterByPid: Boolean): CoreConfigurationBuilder
Set this to true if you want to include only logcat lines related to your Application process.
withLogcatReadNonBlocking
Link copied to clipboard
fun withLogcatReadNonBlocking(logcatReadNonBlocking: Boolean): CoreConfigurationBuilder
Set this to true if you want to read logcat lines in a non blocking way for your thread.
withParallel
Link copied to clipboard
fun withParallel(parallel: Boolean): CoreConfigurationBuilder
Allow parallel collection.
withReportContent
Link copied to clipboard
fun withReportContent(vararg reportContent: ReportField): CoreConfigurationBuilder

Redefines the list of {@link ReportField}s collected and sent in your reports.

withReportFormat
Link copied to clipboard
fun withReportFormat(reportFormat: StringFormat): CoreConfigurationBuilder
Format in which the report should be sent
withReportSendFailureToast
Link copied to clipboard
fun withReportSendFailureToast(reportSendFailureToast: String): CoreConfigurationBuilder
Toast shown when report sending fails
withReportSendSuccessToast
Link copied to clipboard
fun withReportSendSuccessToast(reportSendSuccessToast: String): CoreConfigurationBuilder
Toast shown when a report is sent successfully
withResReportSendFailureToast
Link copied to clipboard
fun withResReportSendFailureToast(@StringRes() resReportSendFailureToast: Int): CoreConfigurationBuilder
Toast shown when report sending fails
withResReportSendSuccessToast
Link copied to clipboard
fun withResReportSendSuccessToast(@StringRes() resReportSendSuccessToast: Int): CoreConfigurationBuilder
Toast shown when a report is sent successfully
withRetryPolicyClass
Link copied to clipboard
fun withRetryPolicyClass(retryPolicyClass: Class<out RetryPolicy>): CoreConfigurationBuilder
Implement a custom {@link RetryPolicy} to decide if a failed report should be resent or not.
withSendReportsInDevMode
Link copied to clipboard
fun withSendReportsInDevMode(sendReportsInDevMode: Boolean): CoreConfigurationBuilder
Set this to false if you want to disable sending reports in development mode.
withSharedPreferencesName
Link copied to clipboard
fun withSharedPreferencesName(sharedPreferencesName: String): CoreConfigurationBuilder
Name of the SharedPreferences that will host ACRA settings which you can make accessible to your users through a preferences screen:
  • {@link org.acra.ACRA#PREF_DISABLE_ACRA} or {@link org.acra.ACRA#PREF_ENABLE_ACRA}
  • {@link org.acra.ACRA#PREF_ALWAYS_ACCEPT}
  • {@link org.acra.ACRA#PREF_ENABLE_DEVICE_ID}
  • {@link org.acra.ACRA#PREF_ENABLE_SYSTEM_LOGS}
Default is to use the application default SharedPreferences, as retrieved with {@link android.preference.PreferenceManager#getDefaultSharedPreferences(android.content.
withStopServicesOnCrash
Link copied to clipboard
fun withStopServicesOnCrash(stopServicesOnCrash: Boolean): CoreConfigurationBuilder
If you have services which might crash on startup android will try to restart them indefinitely.

Properties

additionalDropBoxTags
Link copied to clipboard
var additionalDropBoxTags: Array<out String>
Custom tags to be included in DropBox event collection
additionalSharedPreferences
Link copied to clipboard
var additionalSharedPreferences: Array<out String>
Add here your {@link android.content.SharedPreferences} identifier Strings if you use others than your application's default.
alsoReportToAndroidFramework
Link copied to clipboard
var alsoReportToAndroidFramework: Boolean
Set this to true if you prefer displaying the native force close dialog after ACRA is done.
applicationLogFile
Link copied to clipboard
var applicationLogFile: String
To use in combination with {@link ReportField#APPLICATION_LOG} to set the path/name of your application log file.
applicationLogFileDir
Link copied to clipboard
var applicationLogFileDir: Directory
To use in combination with {@link ReportField#APPLICATION_LOG} to set the root for the path provided in {@link #applicationLogFile()}
applicationLogFileLines
Link copied to clipboard
var applicationLogFileLines: Int
To use in combination with {@link ReportField#APPLICATION_LOG} to set the number of latest lines of your application log file to be collected.
attachmentUriProvider
Link copied to clipboard
var attachmentUriProvider: Class<out AttachmentUriProvider>
Allows {@link #attachmentUris()} configuration at runtime instead of compile time.
attachmentUris
Link copied to clipboard
var attachmentUris: Array<out String>
Allows to attach files to crash reports.
buildConfigClass
Link copied to clipboard
var buildConfigClass: Class<*>
The default value will be a BuildConfig class residing in the same package as the Application class.
context
Link copied to clipboard
var context: Context
delegate
Link copied to clipboard
var delegate: BaseCoreConfigurationBuilder
var deleteUnapprovedReportsOnApplicationStart: Boolean
Controls whether unapproved reports are deleted on application start or not.
dropboxCollectionMinutes
Link copied to clipboard
var dropboxCollectionMinutes: Int
DropBox event collection will look back this many minutes
enabled
Link copied to clipboard
var enabled: Boolean
excludeMatchingSettingsKeys
Link copied to clipboard
var excludeMatchingSettingsKeys: Array<out String>
Provide here regex patterns to be evaluated on each {@link android.provider.Settings.System}, {@link android.provider.Settings.Secure} and {@link android.provider.Settings.Global} key to exclude KV pairs from being collected.
excludeMatchingSharedPreferencesKeys
Link copied to clipboard
var excludeMatchingSharedPreferencesKeys: Array<out String>
Provide here regex patterns to be evaluated on each {@link android.content.SharedPreferences} key to exclude KV pairs from the collected SharedPreferences.
includeDropBoxSystemTags
Link copied to clipboard
var includeDropBoxSystemTags: Boolean
If enabled, DropBox events collection will include system tags:
  • system_app_anr
  • system_app_wtf
  • system_app_crash
  • system_server_anr
  • system_server_wtf
  • system_server_crash
  • BATTERY_DISCHARGE_INFO
  • SYSTEM_RECOVERY_LOG
  • SYSTEM_BOOT
  • SYSTEM_LAST_KMSG
  • APANIC_CONSOLE
  • APANIC_THREADS
  • SYSTEM_RESTART
  • SYSTEM_TOMBSTONE
  • data_app_strictmode
logcatArguments
Link copied to clipboard
var logcatArguments: Array<out String>

Arguments to be passed to the logcat command line.

logcatFilterByPid
Link copied to clipboard
var logcatFilterByPid: Boolean
Set this to true if you want to include only logcat lines related to your Application process.
logcatReadNonBlocking
Link copied to clipboard
var logcatReadNonBlocking: Boolean
Set this to true if you want to read logcat lines in a non blocking way for your thread.
parallel
Link copied to clipboard
var parallel: Boolean
Allow parallel collection.
reportContent
Link copied to clipboard
var reportContent: Array<out ReportField>

Redefines the list of {@link ReportField}s collected and sent in your reports.

reportFormat
Link copied to clipboard
var reportFormat: StringFormat
Format in which the report should be sent
reportSendFailureToast
Link copied to clipboard
var reportSendFailureToast: String
Toast shown when report sending fails
reportSendSuccessToast
Link copied to clipboard
var reportSendSuccessToast: String
Toast shown when a report is sent successfully
retryPolicyClass
Link copied to clipboard
var retryPolicyClass: Class<out RetryPolicy>
Implement a custom {@link RetryPolicy} to decide if a failed report should be resent or not.
sendReportsInDevMode
Link copied to clipboard
var sendReportsInDevMode: Boolean
Set this to false if you want to disable sending reports in development mode.
sharedPreferencesName
Link copied to clipboard
var sharedPreferencesName: String
Name of the SharedPreferences that will host ACRA settings which you can make accessible to your users through a preferences screen:
  • {@link org.acra.ACRA#PREF_DISABLE_ACRA} or {@link org.acra.ACRA#PREF_ENABLE_ACRA}
  • {@link org.acra.ACRA#PREF_ALWAYS_ACCEPT}
  • {@link org.acra.ACRA#PREF_ENABLE_DEVICE_ID}
  • {@link org.acra.ACRA#PREF_ENABLE_SYSTEM_LOGS}
Default is to use the application default SharedPreferences, as retrieved with {@link android.preference.PreferenceManager#getDefaultSharedPreferences(android.content.
stopServicesOnCrash
Link copied to clipboard
var stopServicesOnCrash: Boolean
If you have services which might crash on startup android will try to restart them indefinitely.

Extensions

dialog
Link copied to clipboard
fun CoreConfigurationBuilder.dialog(initializer: DialogConfigurationBuilder.() -> Unit)
getPluginConfigurationBuilder
Link copied to clipboard
inline fun <T : ConfigurationBuilder> CoreConfigurationBuilder.getPluginConfigurationBuilder(): T
httpSender
Link copied to clipboard
fun CoreConfigurationBuilder.httpSender(initializer: HttpSenderConfigurationBuilder.() -> Unit)
limiter
Link copied to clipboard
fun CoreConfigurationBuilder.limiter(initializer: LimiterConfigurationBuilder.() -> Unit)
mailSender
Link copied to clipboard
fun CoreConfigurationBuilder.mailSender(initializer: MailSenderConfigurationBuilder.() -> Unit)
notification
Link copied to clipboard
fun CoreConfigurationBuilder.notification(initializer: NotificationConfigurationBuilder.() -> Unit)
plugin
Link copied to clipboard
inline fun <T : ConfigurationBuilder> CoreConfigurationBuilder.plugin(initializer: T.() -> Unit)
scheduler
Link copied to clipboard
fun CoreConfigurationBuilder.scheduler(initializer: SchedulerConfigurationBuilder.() -> Unit)
toast
Link copied to clipboard
fun CoreConfigurationBuilder.toast(initializer: ToastConfigurationBuilder.() -> Unit)