use of org.acra.config.ACRAConfigurationException in project NewPipe by TeamNewPipe.
the class App method onCreate.
@Override
public void onCreate() {
super.onCreate();
// init crashreport
try {
final ACRAConfiguration acraConfig = new ConfigurationBuilder(this).setReportSenderFactoryClasses(reportSenderFactoryClasses).build();
ACRA.init(this, acraConfig);
} catch (ACRAConfigurationException ace) {
ace.printStackTrace();
ErrorActivity.reportError(this, ace, null, null, ErrorActivity.ErrorInfo.make(ErrorActivity.SEARCHED, "none", "Could not initialize ACRA crash report", R.string.app_ui_crash));
}
//init NewPipe
NewPipe.init(Downloader.getInstance());
// Initialize image loader
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this).build();
ImageLoader.getInstance().init(config);
/*
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if(prefs.getBoolean(getString(R.string.use_tor_key), false)) {
OrbotHelper.requestStartTor(this);
configureTor(true);
} else {
configureTor(false);
}*/
configureTor(false);
// DO NOT REMOVE THIS FUNCTION!!!
// Otherwise downloadPathPreference has invalid value.
SettingsActivity.initSettings(this);
}
use of org.acra.config.ACRAConfigurationException in project opacclient by opacapp.
the class OpacClient method onCreate.
@Override
public void onCreate() {
super.onCreate();
sp = PreferenceManager.getDefaultSharedPreferences(this);
if (!BuildConfig.DEBUG) {
try {
final ACRAConfiguration config = new ConfigurationBuilder(this).setResToastText(R.string.crash_toast_text).setResDialogText(R.string.crash_dialog_text).setResToastText(R.string.crash_toast_text).setResNotifTickerText(R.string.crash_notif_ticker_text).setResNotifTitle(R.string.crash_notif_title).setResNotifText(R.string.crash_notif_text).setResNotifIcon(android.R.drawable.stat_notify_error).setResDialogText(R.string.crash_dialog_text).build();
ACRA.init(this, config);
if (getLibrary() != null) {
ACRA.getErrorReporter().putCustomData("library", getLibrary().getIdent());
}
DateTime lastUpdate = new PreferenceDataSource(getApplicationContext()).getLastLibraryConfigUpdate();
ACRA.getErrorReporter().putCustomData("data_version", lastUpdate != null ? lastUpdate.toString() : "null");
} catch (ACRAConfigurationException e) {
e.printStackTrace();
}
}
DebugTools.init(this);
OpacClient.context = getApplicationContext();
try {
OpacClient.versionName = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
} catch (NameNotFoundException e) {
e.printStackTrace();
}
// Schedule alarms
JobManager.create(this).addJobCreator(new SyncAccountJobCreator());
SyncAccountJob.scheduleJob(this);
}
use of org.acra.config.ACRAConfigurationException in project NewPipe by TeamNewPipe.
the class App method initACRA.
private void initACRA() {
try {
final ACRAConfiguration acraConfig = new ConfigurationBuilder(this).setReportSenderFactoryClasses(reportSenderFactoryClasses).setBuildConfigClass(BuildConfig.class).build();
ACRA.init(this, acraConfig);
} catch (ACRAConfigurationException ace) {
ace.printStackTrace();
ErrorActivity.reportError(this, ace, null, null, ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none", "Could not initialize ACRA crash report", R.string.app_ui_crash));
}
}
Aggregations