public static void setG6Defaults() { Pref.setBoolean("use_ob1_g5_collector_service", true); Pref.setBoolean("ob1_g5_use_transmitter_alg", true); Pref.setBoolean("ob1_g5_fallback_to_xdrip", false); Pref.setBoolean("display_glucose_from_plugin", false); setG6bareBones(); }
public static void setG6Defaults() { Pref.setBoolean("use_ob1_g5_collector_service", true); Pref.setBoolean("ob1_g5_use_transmitter_alg", true); Pref.setBoolean("ob1_g5_fallback_to_xdrip", false); Pref.setBoolean("display_glucose_from_plugin", false); setG6bareBones(); }
public static void setG6Defaults() { Pref.setBoolean("use_ob1_g5_collector_service", true); Pref.setBoolean("ob1_g5_use_transmitter_alg", true); Pref.setBoolean("ob1_g5_fallback_to_xdrip", false); Pref.setBoolean("display_glucose_from_plugin", false); setG6bareBones(); }
public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); Pref.setBoolean("predictive_bg", false); toast("Setting disabled :)"); } });
public void onClick(DialogInterface dialog, int which) { Pref.setBoolean("bluetooth_meter_for_calibrations_auto", true); JoH.static_toast_long("Automated calibration enabled"); dialog.dismiss(); } });
private static void correctWebServiceSettings() { Pref.setBoolean("xdrip_webservice", true); Pref.setBoolean("xdrip_webservice_open", true); if (Pref.getString(PREF_WEBSERVICE_SECRET, "").length() == 0) { Pref.setString(PREF_WEBSERVICE_SECRET, CipherUtils.getRandomHexKey()); } Inevitable.task("web service changed", 2000, XdripWebService::settingsChanged); }
public void setbool(String name, boolean value) { Pref.setBoolean(name, value); super.put(name, value); doRunnable(); }
public static void setG6bareBones() { Pref.setBoolean("using_g6", true); // TODO add initiate bonding true in case gets disabled?? final int battery_warning_level = Pref.getStringToInt("g5-battery-warning-level", G5_LOW_BATTERY_WARNING_DEFAULT); if (battery_warning_level == G5_LOW_BATTERY_WARNING_DEFAULT) { Pref.setString("g5-battery-warning-level", "" + G6_LOW_BATTERY_WARNING_DEFAULT); } }
private void enableBoolean(String id, String msg, Intent intent) { Pref.setBoolean(id, true); JoH.static_toast_long(msg); cancelSourceNotification(intent); }
public static void setG6bareBones() { Pref.setBoolean("using_g6", true); // TODO add initiate bonding true in case gets disabled?? final int battery_warning_level = Pref.getStringToInt("g5-battery-warning-level", G5_LOW_BATTERY_WARNING_DEFAULT); if (battery_warning_level == G5_LOW_BATTERY_WARNING_DEFAULT) { Pref.setString("g5-battery-warning-level", "" + G6_LOW_BATTERY_WARNING_DEFAULT); } }
public static void setG6bareBones() { Pref.setBoolean("using_g6", true); // TODO add initiate bonding true in case gets disabled?? final int battery_warning_level = Pref.getStringToInt("g5-battery-warning-level", G5_LOW_BATTERY_WARNING_DEFAULT); if (battery_warning_level == G5_LOW_BATTERY_WARNING_DEFAULT) { Pref.setString("g5-battery-warning-level", "" + G6_LOW_BATTERY_WARNING_DEFAULT); } }
@Override public Boolean put(String key, Boolean value) { if (!(super.get(key).equals(value))) { Pref.setBoolean(key, value); super.put(key, value); doRunnable(); } return value; }
@Override public Boolean put(String key, Boolean value) { if (!(super.get(key).equals(value))) { Pref.setBoolean(key, value); super.put(key, value); doRunnable(); } return value; }
@Override public void onReceive(Context context, Intent intent) { Log.d(TAG, "Received pairing request"); if (!JoH.doPairingRequest(context, this, intent, mDeviceAddress, DEFAULT_BT_PIN)) { UserError.Log.d(TAG, "Pairing request marked as failed, reducing settings to avoid auto-pairing"); Pref.setBoolean("blukon_unbonding", false); unRegisterPairingReceiver(); } } };
@Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.action_toggle_historystats) { Pref.setBoolean("show_history_stats", !Pref.getBoolean("show_history_stats", true)); invalidateOptionsMenu(); setupCharts(); return true; } return super.onOptionsItemSelected(item); }
@Override public void onReceive(Context context, Intent intent) { Log.d(TAG, "Received pairing request"); if (!JoH.doPairingRequest(context, this, intent, mDeviceAddress, DEFAULT_BT_PIN)) { UserError.Log.d(TAG, "Pairing request marked as failed, reducing settings to avoid auto-pairing"); Pref.setBoolean("blukon_unbonding", false); unRegisterPairingReceiver(); } } };
@Override public void onReceive(Context context, Intent intent) { Log.d(TAG, "Received pairing request"); if (!JoH.doPairingRequest(context, this, intent, mDeviceAddress, DEFAULT_BT_PIN)) { UserError.Log.d(TAG, "Pairing request marked as failed, reducing settings to avoid auto-pairing"); Pref.setBoolean("blukon_unbonding", false); unRegisterPairingReceiver(); } } };
@Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.action_toggle_historystats) { Pref.setBoolean("show_history_stats", !Pref.getBoolean("show_history_stats", true)); invalidateOptionsMenu(); setupCharts(); return true; } return super.onOptionsItemSelected(item); }
private synchronized void markDeviceAsSuccessful(BluetoothGatt gatt) { if (!Pref.getStringDefaultBlank("selected_bluetooth_meter_address").equals(mLastConnectedDeviceAddress)) { Pref.setString("selected_bluetooth_meter_address", mLastConnectedDeviceAddress); Pref.setString("selected_bluetooth_meter_info", mLastManufacturer + " " + mLastConnectedDeviceAddress); Pref.setBoolean("bluetooth_meter_enabled", true); // auto-enable the setting JoH.static_toast_long("Success with: " + mLastConnectedDeviceAddress + " Enabling auto-start"); if (gatt != null) sendDeviceUpdate(gatt.getDevice(), true); // force update } }
private synchronized void markDeviceAsSuccessful(BluetoothGatt gatt) { if (!Pref.getStringDefaultBlank("selected_bluetooth_meter_address").equals(mLastConnectedDeviceAddress)) { Pref.setString("selected_bluetooth_meter_address", mLastConnectedDeviceAddress); Pref.setString("selected_bluetooth_meter_info", mLastManufacturer + " " + mLastConnectedDeviceAddress); Pref.setBoolean("bluetooth_meter_enabled", true); // auto-enable the setting JoH.static_toast_long("Success with: " + mLastConnectedDeviceAddress + " Enabling auto-start"); if (gatt != null) sendDeviceUpdate(gatt.getDevice(), true); // force update } }