I use ACRA 5.8.4 and I want to update it to 5.9.6 but @annotations are deprecated and I have to change it to PluginConfigurations, but documentation isn't finished and I don't know how to do it. This is my current Application class:
package com.mycompany.myapp;
import android.app.Application;
import android.content.Context;
import androidx.multidex.MultiDex;
import org.acra.ACRA;
import org.acra.annotation.AcraCore;
import org.acra.annotation.AcraDialog;
import org.acra.annotation.AcraMailSender;
@AcraCore(buildConfigClass = BuildConfig.class)
@AcraMailSender(mailTo = "[email protected]",
resSubject = R.string.mailsubject)
@AcraDialog(resTitle = R.string.acratitle,
resText = R.string.acratext,
resPositiveButtonText = R.string.acrasend,
resNegativeButtonText = R.string.acracancel,
resCommentPrompt = R.string.acracomprompt )
public class MyAwsomeApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
// The following line triggers the initialization of ACRA
ACRA.init(this);
}
}
And I want to update it to pluginconfigurations:
public class MyAwsomeApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
// The following line triggers the initialization of ACRA
CoreConfigurationBuilder builder;
builder = new CoreConfigurationBuilder()
.withBuildConfigClass(BuildConfig.class)
.withReportFormat(StringFormat.JSON)
.withPluginConfigurations(
<-- I think, here I should add new clases for dialog and mail sender -->
);
ACRA.init(this, builder);
}
}
You can use
examples for configuration builders can be found on: https://www.acra.ch/docs/Senders