use of de.geeksfactory.opacclient.reminder.SyncAccountJobCreator 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);
}
Aggregations