public static void resetInstance() { retrofit = null; service = null; UserError.Log.d(TAG, "Instance reset"); CollectionServiceStarter.restartCollectionServiceBackground(); }
public static void resetInstance() { retrofit = null; service = null; UserError.Log.d(TAG, "Instance reset"); CollectionServiceStarter.restartCollectionServiceBackground(); }
public static void restartCollectionService(Context context) { Log.d(TAG, "Restart with context"); restartCollectionServiceBackground(); }
public static void restartCollectionService(Context context) { Log.d(TAG, "Restart with context"); restartCollectionServiceBackground(); }
@Override public void run() { // InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS does not seem functional here Pref.setString(pref, Pref.getString(pref, "").toUpperCase()); Home.staticRefreshBGCharts(); CollectionServiceStarter.restartCollectionServiceBackground(); } });
@Override public void run() { // InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS does not seem functional here Pref.setString(pref, Pref.getString(pref, "").toUpperCase()); Home.staticRefreshBGCharts(); CollectionServiceStarter.restartCollectionServiceBackground(); } });
CollectionServiceStarter.restartCollectionServiceBackground(); break; case "android.intent.action.BOOT_COMPLETED": log("Received boot complete"); CollectionServiceStarter.restartCollectionServiceBackground(); break; default:
if (Medtrum.saveSerialFromLegacy(adverts.get(device.getAddress()))) { JoH.static_toast_long("Set Medtrum serial number"); CollectionServiceStarter.restartCollectionServiceBackground(); returnToHome(); } else {
CollectionServiceStarter.restartCollectionServiceBackground(); } catch (Exception e) { UserError.Log.wtf(TAG, "Failed to start collector: " + e);
CollectionServiceStarter.restartCollectionServiceBackground(); } catch (Exception e) { UserError.Log.wtf(TAG, "Failed to start collector: " + e);
public synchronized static void stop() { Sensor.stopSensor(); Inevitable.task("stop-sensor",1000, Sensor::stopSensor); AlertPlayer.getPlayer().stopAlert(xdrip.getAppContext(), true, false); JoH.static_toast_long("Sensor stopped"); JoH.clearCache(); LibreAlarmReceiver.clearSensorStats(); PluggableCalibration.invalidateAllCaches(); Ob1G5StateMachine.stopSensor(); CollectionServiceStarter.restartCollectionServiceBackground(); Home.staticRefreshBGCharts(); }
public synchronized static void stop() { Sensor.stopSensor(); Inevitable.task("stop-sensor",1000, Sensor::stopSensor); AlertPlayer.getPlayer().stopAlert(xdrip.getAppContext(), true, false); JoH.static_toast_long("Sensor stopped"); JoH.clearCache(); LibreAlarmReceiver.clearSensorStats(); PluggableCalibration.invalidateAllCaches(); Ob1G5StateMachine.stopSensor(); CollectionServiceStarter.restartCollectionServiceBackground(); Home.staticRefreshBGCharts(); }
public static void startSensorForTime(long startTime) { Sensor.create(startTime); UserError.Log.ueh("NEW SENSOR", "Sensor started at " + JoH.dateTimeText(startTime)); JoH.static_toast_long(gs(R.string.new_sensor_started)); startWatchUpdaterService(xdrip.getAppContext(), WatchUpdaterService.ACTION_SYNC_SENSOR, TAG); LibreAlarmReceiver.clearSensorStats(); // TODO this is just a timer and could be confusing - consider removing this notification // JoH.scheduleNotification(xdrip.getAppContext(), "Sensor should be ready", xdrip.getAppContext().getString(R.string.please_enter_two_calibrations_to_get_started), 60 * 130, Home.SENSOR_READY_ID); // reverse libre hacky workaround Treatments.SensorStart((DexCollectionType.hasLibre() ? startTime + (3600000) : startTime)); CollectionServiceStarter.restartCollectionServiceBackground(); Ob1G5StateMachine.startSensor(startTime); JoH.clearCache(); Home.staticRefreshBGCharts(); }
public static void startSensorForTime(long startTime) { Sensor.create(startTime); UserError.Log.ueh("NEW SENSOR", "Sensor started at " + JoH.dateTimeText(startTime)); JoH.static_toast_long(gs(R.string.new_sensor_started)); startWatchUpdaterService(xdrip.getAppContext(), WatchUpdaterService.ACTION_SYNC_SENSOR, TAG); LibreAlarmReceiver.clearSensorStats(); // TODO this is just a timer and could be confusing - consider removing this notification // JoH.scheduleNotification(xdrip.getAppContext(), "Sensor should be ready", xdrip.getAppContext().getString(R.string.please_enter_two_calibrations_to_get_started), 60 * 130, Home.SENSOR_READY_ID); // reverse libre hacky workaround Treatments.SensorStart((DexCollectionType.hasLibre() ? startTime + (3600000) : startTime)); CollectionServiceStarter.restartCollectionServiceBackground(); Ob1G5StateMachine.startSensor(startTime); JoH.clearCache(); Home.staticRefreshBGCharts(); }
AlertType.fromSettings(getApplicationContext()); CollectionServiceStarter.restartCollectionServiceBackground(); PlusSyncService.startSyncService(context, "xdrip.java"); if (Pref.getBoolean("motion_tracking_enabled", false)) {
AlertType.fromSettings(getApplicationContext()); CollectionServiceStarter.restartCollectionServiceBackground(); PlusSyncService.startSyncService(context, "xdrip.java"); if (Pref.getBoolean("motion_tracking_enabled", false)) {
Log.e(TAG, "Aggressively restarting collector service due to lack of reception: backoff: " + aggressive_backoff_timer); if (aggressive_backoff_timer < 1200) aggressive_backoff_timer += 60; CollectionServiceStarter.restartCollectionServiceBackground(); } else { aggressive_backoff_timer = 120; // reset
Log.e(TAG, "Aggressively restarting collector service due to lack of reception: backoff: " + aggressive_backoff_timer); if (aggressive_backoff_timer < 1200) aggressive_backoff_timer += 60; CollectionServiceStarter.restartCollectionServiceBackground(); } else { aggressive_backoff_timer = 120; // reset
CollectionServiceStarter.restartCollectionServiceBackground(); break;
CollectionServiceStarter.restartCollectionServiceBackground(); break;