@Documented @Retention(value=RUNTIME) @Target(value=TYPE) @Inherited public @interface ReportsCrashes
ACRA.init(android.app.Application)
method. The only mandatory
configuration item is the formUri()
parameter which is the Uri
to the server that will receive your reports.Modifier and Type | Optional Element and Description |
---|---|
String[] |
additionalDropBoxTags |
String[] |
additionalSharedPreferences
Add here your
SharedPreferences identifier Strings if you use
others than your application's default. |
String |
applicationLogFile
To use in combination with
ReportField.APPLICATION_LOG to set the
path/name of your application log file. |
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 |
buildConfigClass
The default value will be a BuildConfig class residing in the same package as the Application class.
|
int |
connectionTimeout |
ReportField[] |
customReportContent
Redefines the list of
ReportField s collected and sent in your
reports. |
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.
|
boolean |
disableSSLCertValidation
Set this to true if you need to post reports to your own server using an
SSL connection with a self-signed certificate.
|
int |
dropboxCollectionMinutes |
String[] |
excludeMatchingSettingsKeys
Provide here regex patterns to be evaluated on each Settings.System,
Settings.Secure and Settings.Global key to exclude KV pairs from the
collected SharedPreferences.
|
String[] |
excludeMatchingSharedPreferencesKeys
Provide here regex patterns to be evaluated on each SharedPreference key
to exclude KV pairs from the collected SharedPreferences.
|
boolean |
forceCloseDialogAfterToast
In
ReportingInteractionMode.TOAST mode, set this to true if you
prefer displaying the native Force Close dialog after the Toast. |
String |
formUri
The Uri of your own server-side script that will receive reports.
|
String |
formUriBasicAuthLogin
When using the
formUri() parameter to send reports to a custom
server-side script, you can set here and in
formUriBasicAuthPassword() the credentials for a BASIC HTTP
authentication. |
String |
formUriBasicAuthPassword
When using the
formUri() parameter to send reports to a custom
server-side script, you can set here and in
formUriBasicAuthLogin() the credentials for a BASIC HTTP
authentication. |
HttpSender.Method |
httpMethod
The
HttpSender.Method to be used when posting with formUri() . |
String |
httpsSocketFactoryFactoryClass |
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.
|
String |
mailTo
Add your crash reports mailbox here if you want to send reports via
email.
|
int |
maxNumberOfRequestRetries |
ReportingInteractionMode |
mode
The interaction mode you want to implement.
|
Class<? extends BaseCrashReportDialog> |
reportDialogClass |
HttpSender.Type |
reportType |
int |
resDialogCommentPrompt |
int |
resDialogEmailPrompt |
int |
resDialogIcon |
int |
resDialogNegativeButtonText |
int |
resDialogOkToast |
int |
resDialogPositiveButtonText |
int |
resDialogText |
int |
resDialogTitle |
int |
resNotifIcon |
int |
resNotifText |
int |
resNotifTickerText |
int |
resNotifTitle |
int |
resToastText
Resource id for the Toast text triggered when the application crashes if
the
ReportingInteractionMode.TOAST mode is used. |
boolean |
sendReportsAtShutdown
Set this to false if you want to disable sending reports at the time the
exception is caught.
|
boolean |
sendReportsInDevMode
Set this to false if you want to disable sending reports in development
mode.
|
int |
sharedPreferencesMode
If using a custom
sharedPreferencesName() , pass
here the mode that you need for the SharedPreference file creation:
Context.MODE_PRIVATE , Context.MODE_WORLD_READABLE or
Context.MODE_WORLD_WRITEABLE . |
String |
sharedPreferencesName |
int |
socketTimeout
If the request is retried due to timeout, the socketTimeout will double
before retrying the request.
|
public abstract String formUri
public abstract ReportingInteractionMode mode
The interaction mode you want to implement. Default is
ReportingInteractionMode.SILENT
which does not require any
resources configuration.
Other modes have resources requirements:
ReportingInteractionMode.TOAST
requires
resToastText()
to be provided to define the text that you want
to be displayed to the user when a report is being sent.ReportingInteractionMode.NOTIFICATION
requires
resNotifTickerText()
, resNotifTitle()
,
resNotifText()
, resDialogText()
.ReportingInteractionMode.DIALOG
requires
resDialogText()
.
Default is ReportingInteractionMode.SILENT
public abstract int resDialogPositiveButtonText
public abstract int resDialogNegativeButtonText
public abstract int resDialogCommentPrompt
public abstract int resDialogEmailPrompt
public abstract int resDialogIcon
public abstract int resDialogOkToast
public abstract int resDialogText
public abstract int resDialogTitle
public abstract int resNotifIcon
public abstract int resNotifText
public abstract int resNotifTickerText
public abstract int resNotifTitle
public abstract int resToastText
ReportingInteractionMode.TOAST
mode is used. Can also be used
in ReportingInteractionMode.NOTIFICATION
and
ReportingInteractionMode.DIALOG
modes to display a Toast message
while the report is being created, before the dialog/notification
appears. This allows the user to know what is happening just before the
application is terminated.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(Context)
.public abstract int sharedPreferencesMode
sharedPreferencesName()
, pass
here the mode that you need for the SharedPreference file creation:
Context.MODE_PRIVATE
, Context.MODE_WORLD_READABLE
or
Context.MODE_WORLD_WRITEABLE
. Default is
Context.MODE_PRIVATE
.Context.getSharedPreferences(String, int)
public abstract boolean includeDropBoxSystemTags
public abstract String[] additionalDropBoxTags
public abstract int dropboxCollectionMinutes
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
customReportContent()
to activate alternative
logcat buffers reporting. They will use the same other arguments as those
provided here.
public abstract String formUriBasicAuthLogin
formUri()
parameter to send reports to a custom
server-side script, you can set here and in
formUriBasicAuthPassword()
the credentials for a BASIC HTTP
authentication.public abstract String formUriBasicAuthPassword
formUri()
parameter to send reports to a custom
server-side script, you can set here and in
formUriBasicAuthLogin()
the credentials for a BASIC HTTP
authentication.public abstract ReportField[] customReportContent
Redefines the list of ReportField
s collected and sent in your
reports. If you modify this list, you have to create a new Google Drive
Spreadsheet & Form which will be based on these fields as column headers.
The fields order is significant. You can also use this property to modify fields order in your reports.
The default list is the following, except if you send reports by mail
using mailTo()
.
ReportField.REPORT_ID
ReportField.APP_VERSION_CODE
ReportField.APP_VERSION_NAME
ReportField.PACKAGE_NAME
ReportField.FILE_PATH
ReportField.PHONE_MODEL
ReportField.BRAND
ReportField.PRODUCT
ReportField.ANDROID_VERSION
ReportField.BUILD
ReportField.TOTAL_MEM_SIZE
ReportField.AVAILABLE_MEM_SIZE
ReportField.CUSTOM_DATA
ReportField.IS_SILENT
ReportField.STACK_TRACE
ReportField.INITIAL_CONFIGURATION
ReportField.CRASH_CONFIGURATION
ReportField.DISPLAY
ReportField.USER_COMMENT
ReportField.USER_EMAIL
ReportField.USER_APP_START_DATE
ReportField.USER_CRASH_DATE
ReportField.DUMPSYS_MEMINFO
ReportField.LOGCAT
ReportField.INSTALLATION_ID
ReportField.DEVICE_FEATURES
ReportField.ENVIRONMENT
ReportField.SHARED_PREFERENCES
ReportField.SETTINGS_SYSTEM
ReportField.SETTINGS_SECURE
ReportField.SETTINGS_GLOBAL
public abstract String mailTo
Add your crash reports mailbox here if you want to send reports via
email. This allows to get rid of the INTERNET permission. Reports content
can be customized with customReportContent()
. Default fields
are:
public abstract boolean deleteUnapprovedReportsOnApplicationStart
ReportingInteractionMode.NOTIFICATION
mode reports were
previously kept until the user explicitly opens the Notification dialog
AND choose to send or discard the report. Until then, on application
restart, ACRA was issuing a new crash notification for previous reports
pending for approval. This could be misunderstood by the user with a new
crash, resulting in bad appreciation of the application.public abstract boolean deleteOldUnsentReportsOnApplicationStart
public abstract int connectionTimeout
public abstract int socketTimeout
maxNumberOfRequestRetries()
public abstract int maxNumberOfRequestRetries
socketTimeout()
public abstract boolean forceCloseDialogAfterToast
ReportingInteractionMode.TOAST
mode, set this to true if you
prefer displaying the native Force Close dialog after the Toast.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 sendReportsInDevMode
public abstract boolean sendReportsAtShutdown
public abstract String[] excludeMatchingSharedPreferencesKeys
public abstract String[] excludeMatchingSettingsKeys
public abstract Class buildConfigClass
public abstract String applicationLogFile
ReportField.APPLICATION_LOG
to set the
path/name of your application log file. If the string does not contain
any path separator, the file is assumed as being in
Context.getFilesDir()
.Context.getFilesDir()
.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.public abstract boolean disableSSLCertValidation
Set this to true if you need to post reports to your own server using an SSL connection with a self-signed certificate.
public abstract String httpsSocketFactoryFactoryClass
public abstract Class<? extends BaseCrashReportDialog> reportDialogClass
public abstract HttpSender.Method httpMethod
The HttpSender.Method
to be used when posting with formUri()
.
public abstract HttpSender.Type reportType
Copyright © 2010-2015. All Rights Reserved.