Skip to content
F43nd1r edited this page Dec 25, 2017 · 2 revisions

Migrating from ACRA 4 to ACRA 5

  1. Follow the steps in the Setup guide for dependencies and annotations.

  2. Transform your old annotation configuration:

    List of changed annotation options:

    • formUri → AcraHttpSender.uri
    • mode: replaced by automatic plugin discovery
    • resDialogPositiveButtonText → 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 used
    • formUriBasicAuthLogin → AcraHttpSender.basicAuthLogin
    • formUriBasicAuthPassword → AcraHttpSender.basicAuthPassword
    • customReportContent → AcraCore.reportContent
    • mailTo → AcraMail.mailTo
    • connectionTimeout → AcraHttpSender.connectionTimeout
    • socketTimeout → AcraHttpSender.socketTimeout
    • sendReportsAtShutdown: Previously deprecated, now removed
    • reportDialogClass → AcraDialog.reportDialogClass
    • reportPrimerClass: Replaced by ReportingAdministrators, which are loaded by ServiceLoader
    • httpMethod → AcraHttpSender.httpMethod
    • reportType → AcraCore.reportFormat Note: now also supported by EmailSender
    • keyStoreFactoryClass → AcraHttpSender.keyStoreFactoryClass
    • certificatePath → AcraHttpSender.certificatePath
    • resCertificate → AcraHttpSender.resCertificate
    • certificateType → AcraHttpSender.certificateType
    • reportAsFile → AcraMailSender.reportAsFile
    • nonBlockingReadForLogcat → AcraCore.logcatReadNonBlocking
  3. Default output for all senders is now JSON. If you do not want this, use

@AcraCore(reportFormat = StringFormat.KEY_VALUE_LIST)
  1. Moved classes:
  • CrashReportData→ org.acra.data.CrashReportData
  • ACRAConfiguration → org.acra.config.CoreConfiguration + Plugin configurations
  1. Maven Directory:

If you were previously using mavenCentral(), add jcenter(), if it isn't already present.

Clone this wiki locally