Migrating - ACRA/acra GitHub Wiki
Migrating from ACRA 4 to ACRA 5
-
Follow the steps in the Setup guide for dependencies and annotations.
-
Transform your old annotation configuration:
List of changed annotation options:
formUri
→AcraHttpSender.uri
mode
: replaced by automatic plugin discoveryresDialogPositiveButtonText
→AcraDialog.resPositiveButtonText
resDialogNegativeButtonText
→AcraDialog.resNegativeButtonText
resDialogCommentPrompt
→AcraDialog.resCommentPrompt
resDialogEmailPrompt
→AcraDialog.resEmailPrompt
resDialogIcon
→AcraDialog.resIcon
resDialogOkToast
→AcraCore.resReportSendSuccessToast
&AcraCore.resReportSendFailureToast
resDialogText
→AcraDialog.resText
resDialogTitle
→AcraDialog.resTitle
resDialogTheme
→AcraDialog.resTheme
resNotifIcon
→AcraNotification.resIcon
resNotifText
→AcraNotification.resText
resNotifTickerText
→AcraNotification.resTickerText
resNotifTitle
→AcraNotification.resTitle
resToastText
→AcraToast.resText
sharedPreferencesMode
: Removed, now always Context.MODE_PRIVATE, as the other values should not be usedformUriBasicAuthLogin
→AcraHttpSender.basicAuthLogin
formUriBasicAuthPassword
→AcraHttpSender.basicAuthPassword
customReportContent
→AcraCore.reportContent
mailTo
→AcraMail.mailTo
connectionTimeout
→AcraHttpSender.connectionTimeout
socketTimeout
→AcraHttpSender.socketTimeout
sendReportsAtShutdown
: Previously deprecated, now removedreportDialogClass
→AcraDialog.reportDialogClass
reportPrimerClass
: Replaced byReportingAdministrator
s, which are loaded byServiceLoader
httpMethod
→AcraHttpSender.httpMethod
reportType
→AcraCore.reportFormat
Note: now also supported byEmailSender
keyStoreFactoryClass
→AcraHttpSender.keyStoreFactoryClass
certificatePath
→AcraHttpSender.certificatePath
resCertificate
→AcraHttpSender.resCertificate
certificateType
→AcraHttpSender.certificateType
reportAsFile
→AcraMailSender.reportAsFile
nonBlockingReadForLogcat
→AcraCore.logcatReadNonBlocking
-
Default output for all senders is now
JSON
. If you do not want this, use
@AcraCore(reportFormat = StringFormat.KEY_VALUE_LIST)
- Moved classes:
CrashReportData
→org.acra.data.CrashReportData
ACRAConfiguration
→org.acra.config.CoreConfiguration
+ Plugin configurations
- Maven Directory:
If you were previously using mavenCentral()
, add jcenter()
, if it isn't already present.