Search in sources :

Example 6 with CoreConfigurationBuilder

use of org.acra.config.CoreConfigurationBuilder in project AmazeFileManager by TeamAmaze.

the class AppConfig method initACRA.

/**
 * Called in {@link #attachBaseContext(Context)} after calling the {@code super} method. Should be
 * overridden if MultiDex is enabled, since it has to be initialized before ACRA.
 */
protected void initACRA() {
    if (ACRA.isACRASenderServiceProcess()) {
        return;
    }
    try {
        final CoreConfiguration acraConfig = new CoreConfigurationBuilder(this).setBuildConfigClass(BuildConfig.class).setReportFormat(StringFormat.JSON).setSendReportsInDevMode(true).setEnabled(true).build();
        ACRA.init(this, acraConfig);
    } catch (final ACRAConfigurationException ace) {
        ace.printStackTrace();
        ErrorActivity.reportError(this, ace, null, ErrorActivity.ErrorInfo.make(ErrorActivity.ERROR_UNKNOWN, "Could not initialize ACRA crash report", R.string.app_ui_crash));
    }
}
Also used : CoreConfigurationBuilder(org.acra.config.CoreConfigurationBuilder) CoreConfiguration(org.acra.config.CoreConfiguration) ACRAConfigurationException(org.acra.config.ACRAConfigurationException)

Aggregations

CoreConfigurationBuilder (org.acra.config.CoreConfigurationBuilder)6 Test (org.junit.Test)3 Application (android.app.Application)2 SimplePluginLoader (org.acra.plugins.SimplePluginLoader)2 SharedPreferences (android.content.SharedPreferences)1 Uri (android.net.Uri)1 StacktraceCollector (org.acra.collector.StacktraceCollector)1 ACRAConfigurationException (org.acra.config.ACRAConfigurationException)1 CoreConfiguration (org.acra.config.CoreConfiguration)1 DialogConfigurationBuilder (org.acra.config.DialogConfigurationBuilder)1