Search in sources :

Example 1 with CoreConfiguration

use of org.acra.config.CoreConfiguration 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

ACRAConfigurationException (org.acra.config.ACRAConfigurationException)1 CoreConfiguration (org.acra.config.CoreConfiguration)1 CoreConfigurationBuilder (org.acra.config.CoreConfigurationBuilder)1