@Documented @Retention(value=RUNTIME) @Target(value=TYPE) @Inherited public @interface AcraCore
Modifier and Type | Optional Element and Description |
---|---|
String[] |
additionalDropBoxTags
Custom tags to be included in DropBox event collection
|
String[] |
additionalSharedPreferences
Add here your
SharedPreferences identifier Strings if you use others than your application's default. |
boolean |
alsoReportToAndroidFramework
Set this to true if you prefer displaying the native force close dialog after ACRA is done.
|
String |
applicationLogFile
To use in combination with
ReportField.APPLICATION_LOG to set the path/name of your application log file. |
Directory |
applicationLogFileDir
To use in combination with
ReportField.APPLICATION_LOG to set the root for the path provided in applicationLogFile() |
int |
applicationLogFileLines
To use in combination with
ReportField.APPLICATION_LOG to set the number of latest lines of your application log file to be collected. |
Class<? extends AttachmentUriProvider> |
attachmentUriProvider
Allows
attachmentUris() configuration at runtime instead of compile time. |
String[] |
attachmentUris
Allows to attach files to crash reports.
|
Class |
buildConfigClass
The default value will be a BuildConfig class residing in the same package as the Application class.
|
boolean |
deleteOldUnsentReportsOnApplicationStart
This property can be used to determine whether old (out of date) reports should be sent or not.
|
boolean |
deleteUnapprovedReportsOnApplicationStart
Controls whether unapproved reports are deleted on application start or not.
|
int |
dropboxCollectionMinutes
DropBox event collection will look back this many minutes
|
String[] |
excludeMatchingSettingsKeys
Provide here regex patterns to be evaluated on each
Settings.System , Settings.Secure and Settings.Global key to exclude KV pairs from being collected. |
String[] |
excludeMatchingSharedPreferencesKeys
Provide here regex patterns to be evaluated on each
SharedPreferences key to exclude KV pairs from the collected SharedPreferences. |
boolean |
includeDropBoxSystemTags
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
|
String[] |
logcatArguments
Arguments to be passed to the logcat command line.
|
boolean |
logcatFilterByPid
Set this to true if you want to include only logcat lines related to your Application process.
|
boolean |
logcatReadNonBlocking
Set this to true if you want to read logcat lines in a non blocking way for your thread.
|
boolean |
parallel
Allow parallel collection.
|
ReportField[] |
reportContent
Redefines the list of
ReportField s collected and sent in your reports. |
StringFormat |
reportFormat
Format in which the report should be sent
|
Class<? extends ReportSenderFactory>[] |
reportSenderFactoryClasses
The default
ReportSenderFactory automatically discovers other ReportSenderFactories. |
int |
resReportSendFailureToast
Toast shown when report sending fails
|
int |
resReportSendSuccessToast
Toast shown when a report is sent successfully
|
Class<? extends RetryPolicy> |
retryPolicyClass
Implement a custom
RetryPolicy to decide if a failed report should be resent or not. |
boolean |
sendReportsInDevMode
Set this to false if you want to disable sending reports in development mode.
|
String |
sharedPreferencesName
Name of the SharedPreferences that will host ACRA settings which you can make accessible to your users through a preferences screen:
ACRA.PREF_DISABLE_ACRA or ACRA.PREF_ENABLE_ACRA
ACRA.PREF_ALWAYS_ACCEPT
ACRA.PREF_ENABLE_DEVICE_ID
ACRA.PREF_ENABLE_SYSTEM_LOGS
Default is to use the application default SharedPreferences, as retrieved with PreferenceManager.getDefaultSharedPreferences(android.content.Context) |
boolean |
stopServicesOnCrash
If you have services which might crash on startup android will try to restart them indefinitely.
|
@NonNull public abstract String sharedPreferencesName
ACRA.PREF_DISABLE_ACRA
or ACRA.PREF_ENABLE_ACRA
ACRA.PREF_ALWAYS_ACCEPT
ACRA.PREF_ENABLE_DEVICE_ID
ACRA.PREF_ENABLE_SYSTEM_LOGS
PreferenceManager.getDefaultSharedPreferences(android.content.Context)
public abstract boolean includeDropBoxSystemTags
public abstract int dropboxCollectionMinutes
@NonNull public abstract String[] logcatArguments
Arguments to be passed to the logcat command line. Default is { "-t", "100", "-v", "time" } for:
logcat -t 100 -v time
Do not include -b arguments for buffer selection, include ReportField.EVENTSLOG
and ReportField.RADIOLOG
in reportContent()
to activate alternative logcat buffers reporting.
They will use the same other arguments as those provided here.
@NonNull public abstract ReportField[] reportContent
Redefines the list of ReportField
s collected and sent in your reports.
You can also use this property to modify fields order in your reports.
The default list is ACRAConstants.DEFAULT_REPORT_FIELDS
public abstract boolean deleteUnapprovedReportsOnApplicationStart
Silent and Toast reports are automatically approved. Dialog and Notification reports require explicit approval by the user before they are sent.
On application restart the user is prompted with approval for one unsent report. So you generally don't want to accumulate unapproved reports, otherwise you will prompt them multiple times.
If this is set to true then all unapproved reports bar one will be deleted on application start. The last report is always retained because that is the report that probably just happened.
public abstract boolean deleteOldUnsentReportsOnApplicationStart
public abstract boolean alsoReportToAndroidFramework
@NonNull public abstract String[] additionalSharedPreferences
SharedPreferences
identifier Strings if you use others than your application's default. They will be added to the ReportField.SHARED_PREFERENCES
field.public abstract boolean logcatFilterByPid
public abstract boolean logcatReadNonBlocking
public abstract boolean sendReportsInDevMode
@NonNull public abstract String[] excludeMatchingSharedPreferencesKeys
SharedPreferences
key to exclude KV pairs from the collected SharedPreferences.
This allows you to exclude sensitive user data like passwords from being collected.@NonNull public abstract String[] excludeMatchingSettingsKeys
Settings.System
, Settings.Secure
and Settings.Global
key to exclude KV pairs from being collected.
This allows you to exclude sensitive data from being collected.@NonNull public abstract Class buildConfigClass
@NonNull public abstract Class<? extends ReportSenderFactory>[] reportSenderFactoryClasses
ReportSenderFactory
automatically discovers other ReportSenderFactories.ReportSenderFactory
s with which to construct the ReportSender
s that will send the crash reports.@NonNull public abstract String applicationLogFile
ReportField.APPLICATION_LOG
to set the path/name of your application log file.public abstract int applicationLogFileLines
ReportField.APPLICATION_LOG
to set the number of latest lines of your application log file to be collected.
Default value is 100.@NonNull public abstract Directory applicationLogFileDir
ReportField.APPLICATION_LOG
to set the root for the path provided in applicationLogFile()
@NonNull public abstract Class<? extends RetryPolicy> retryPolicyClass
RetryPolicy
to decide if a failed report should be resent or not.public abstract boolean stopServicesOnCrash
@NonNull public abstract String[] attachmentUris
ACRA contains a file provider under the following Uri:
content://[applicationId].acra/[Directory]/[Path]
where [applicationId]
is your application package name, [Directory]
is one of the enum constants in Directory
in lower case and [Path]
is the relative path to the file in that directory
e.g. content://org.acra.test.acra/files/thisIsATest.txt
@NonNull public abstract Class<? extends AttachmentUriProvider> attachmentUriProvider
attachmentUris()
configuration at runtime instead of compile time.@StringRes public abstract int resReportSendSuccessToast
@StringRes public abstract int resReportSendFailureToast
@NonNull public abstract StringFormat reportFormat