gpt4 book ai didi

com.eveningoutpost.dexdrip.xdrip.gs()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 18:50:40 29 4
gpt4 key购买 nike

本文整理了Java中com.eveningoutpost.dexdrip.xdrip.gs()方法的一些代码示例,展示了xdrip.gs()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。xdrip.gs()方法的具体详情如下:
包路径:com.eveningoutpost.dexdrip.xdrip
类名称:xdrip
方法名:gs

xdrip.gs介绍

暂无

代码示例

代码示例来源:origin: jamorham/xDrip-plus

private String getYfrom() {
  return xdrip.gs(R.string.gcmtpc) + topic;
}

代码示例来源:origin: NightscoutFoundation/xDrip

private String getYfrom() {
  return xdrip.gs(R.string.gcmtpc) + topic;
}

代码示例来源:origin: NightscoutFoundation/xDrip

private static String getString(@StringRes final int id) {
  return xdrip.gs(id);
}

代码示例来源:origin: jamorham/xDrip-plus

private static String getString(@StringRes final int id) {
  return xdrip.gs(id);
}

代码示例来源:origin: NightscoutFoundation/xDrip

private static void msg(@StringRes final int id) {
  msg(xdrip.gs(id));
}

代码示例来源:origin: NightscoutFoundation/xDrip

private static void err(@StringRes final int id) {
  err(xdrip.gs(id));
}

代码示例来源:origin: jamorham/xDrip-plus

private static void err(@StringRes final int id) {
  err(xdrip.gs(id));
}

代码示例来源:origin: jamorham/xDrip-plus

private static void msg(@StringRes final int id) {
  msg(xdrip.gs(id));
}

代码示例来源:origin: NightscoutFoundation/xDrip

private boolean checkPermissions() {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    if (ContextCompat.checkSelfPermission(getApplicationContext(),
        android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
        != PackageManager.PERMISSION_GRANTED) {
      final Activity activity = this;
      JoH.show_ok_dialog(activity, gs(R.string.please_allow_permission), gs(R.string.need_storage_permission_to_access_all_ringtones), new Runnable() {
        @Override
        public void run() {
          ActivityCompat.requestPermissions(activity,
              new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE}, MY_PERMISSIONS_REQUEST_STORAGE);
        }
      });
      return false;
    }
  }
  return true;
}

代码示例来源:origin: NightscoutFoundation/xDrip

private boolean checkContactsPermission() {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    if (ContextCompat.checkSelfPermission(getApplicationContext(),
        Manifest.permission.READ_CONTACTS)
        != PackageManager.PERMISSION_GRANTED) {
      final Activity activity = this;
      JoH.show_ok_dialog(activity, gs(R.string.please_allow_permission), gs(R.string.need_contacts_permission_to_select_message_recipients), new Runnable() {
        @Override
        public void run() {
          ActivityCompat.requestPermissions(activity,
              new String[]{Manifest.permission.READ_CONTACTS}, MY_PERMISSIONS_REQUEST_CONTACTS);
        }
      });
      return false;
    }
  }
  return true;
}

代码示例来源:origin: NightscoutFoundation/xDrip

private boolean checkStoragePermissions(String msg) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    if (ContextCompat.checkSelfPermission(getApplicationContext(),
        android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
        != PackageManager.PERMISSION_GRANTED) {
      final Activity activity = this;
      JoH.show_ok_dialog(activity, gs(R.string.please_allow_permission), msg, () -> ActivityCompat.requestPermissions(activity,
          new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE}, MY_PERMISSIONS_REQUEST_STORAGE));
      return false;
    }
  }
  return true;
}

代码示例来源:origin: jamorham/xDrip-plus

private boolean checkStoragePermissions(String msg) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    if (ContextCompat.checkSelfPermission(getApplicationContext(),
        android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
        != PackageManager.PERMISSION_GRANTED) {
      final Activity activity = this;
      JoH.show_ok_dialog(activity, gs(R.string.please_allow_permission), msg, () -> ActivityCompat.requestPermissions(activity,
          new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE}, MY_PERMISSIONS_REQUEST_STORAGE));
      return false;
    }
  }
  return true;
}

代码示例来源:origin: NightscoutFoundation/xDrip

public void onClick(View v) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && DexCollectionType.hasBluetooth()) {
      if (!LocationHelper.locationPermission(StartNewSensor.this)) {
        JoH.show_ok_dialog(activity, gs(R.string.please_allow_permission), gs(R.string.location_permission_needed_to_use_bluetooth), new Runnable() {
          @Override
          public void run() {
            activity.requestPermissions(new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 0);
          }
        });
      } else {
        sensorButtonClick();
      }
    } else {
      sensorButtonClick();
    }
  }
});

代码示例来源:origin: jamorham/xDrip-plus

public void onClick(View v) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && DexCollectionType.hasBluetooth()) {
      if (!LocationHelper.locationPermission(StartNewSensor.this)) {
        JoH.show_ok_dialog(activity, gs(R.string.please_allow_permission), gs(R.string.location_permission_needed_to_use_bluetooth), new Runnable() {
          @Override
          public void run() {
            activity.requestPermissions(new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 0);
          }
        });
      } else {
        sensorButtonClick();
      }
    } else {
      sensorButtonClick();
    }
  }
});

代码示例来源:origin: NightscoutFoundation/xDrip

private void realRealStartSensor() {
  long startTime = ucalendar.getTime().getTime();
  Log.d(TAG, "Starting sensor time: " + JoH.dateTimeText(ucalendar.getTime().getTime()));
  if (new Date().getTime() + 15 * 60000 < startTime) {
    Toast.makeText(this, gs(R.string.error_sensor_start_time_in_future), Toast.LENGTH_LONG).show();
    return;
  }
  startSensorForTime(startTime);
  Intent intent;
  if (Pref.getBoolean("store_sensor_location", false) && Experience.gotData()) {
    intent = new Intent(getApplicationContext(), NewSensorLocation.class);
  } else {
    intent = new Intent(getApplicationContext(), Home.class);
  }
  startActivity(intent);
  finish();
}

代码示例来源:origin: jamorham/xDrip-plus

private void realRealStartSensor() {
  long startTime = ucalendar.getTime().getTime();
  Log.d(TAG, "Starting sensor time: " + JoH.dateTimeText(ucalendar.getTime().getTime()));
  if (new Date().getTime() + 15 * 60000 < startTime) {
    Toast.makeText(this, gs(R.string.error_sensor_start_time_in_future), Toast.LENGTH_LONG).show();
    return;
  }
  startSensorForTime(startTime);
  Intent intent;
  if (Pref.getBoolean("store_sensor_location", false) && Experience.gotData()) {
    intent = new Intent(getApplicationContext(), NewSensorLocation.class);
  } else {
    intent = new Intent(getApplicationContext(), Home.class);
  }
  startActivity(intent);
  finish();
}

代码示例来源:origin: NightscoutFoundation/xDrip

private synchronized boolean checkSMSPermission() {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    if (!isSMSPermissionGranted()) {
      if (JoH.ratelimit("check-sms-permission", 2)) {
        final Activity activity = this;
        JoH.show_ok_dialog(activity, gs(R.string.please_allow_permission), "Need SMS permission to send text messages to your emergency contacts."
            + "\n\n"
            + "Warning this can cost money at normal telecoms rates!", () -> ActivityCompat.requestPermissions(activity,
            new String[]{Manifest.permission.SEND_SMS}, MY_PERMISSIONS_REQUEST_SMS));
      }
      return false;
    }
  } else {
    JoH.show_ok_dialog(this, "Needs Android 6+", "This feature is not designed for Android versions < 6\nIf you want this on an older phone please create an issue on the xDrip issue tracker and request it.", null);
    return false;
  }
  return true;
}

代码示例来源:origin: NightscoutFoundation/xDrip

private void askSesorInsertionTime() {
  final Calendar calendar = Calendar.getInstance();
  TimePickerFragment timePickerFragment = new TimePickerFragment();
  timePickerFragment.setTime(calendar.get(Calendar.HOUR_OF_DAY), calendar.get(Calendar.MINUTE));
  timePickerFragment.setTitle(gs(R.string.what_time_was_it_inserted));
  timePickerFragment.setTimeCallback(new ProfileAdapter.TimePickerCallbacks() {
    @Override
    public void onTimeUpdated(int newmins) {
      int min = newmins % 60;
      int hour = (newmins - min) / 60;
      ucalendar.set(ucalendar.get(Calendar.YEAR), ucalendar.get(Calendar.MONTH), ucalendar.get(Calendar.DAY_OF_MONTH), hour, min);
      if (DexCollectionType.hasLibre()) {
        ucalendar.add(Calendar.HOUR_OF_DAY, -1); // hack for warmup time
      }
      realStartSensor();
    }
  });
  timePickerFragment.show(activity.getFragmentManager(), "TimePicker");
}

代码示例来源:origin: jamorham/xDrip-plus

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();
}

代码示例来源:origin: NightscoutFoundation/xDrip

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();
}

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com