- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.eveningoutpost.dexdrip.xdrip.gs()
方法的一些代码示例,展示了xdrip.gs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。xdrip.gs()
方法的具体详情如下:
包路径:com.eveningoutpost.dexdrip.xdrip
类名称: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();
}
本文整理了Java中com.eveningoutpost.dexdrip.xdrip.checkForcedEnglish()方法的一些代码示例,展示了xdrip.checkForcedEnglish
本文整理了Java中com.eveningoutpost.dexdrip.xdrip.initBF()方法的一些代码示例,展示了xdrip.initBF()的具体用法。这些代码示例主要来源于Githu
本文整理了Java中com.eveningoutpost.dexdrip.xdrip.gs()方法的一些代码示例,展示了xdrip.gs()的具体用法。这些代码示例主要来源于Github/Stacko
本文整理了Java中com.eveningoutpost.dexdrip.xdrip.isRunningTest()方法的一些代码示例,展示了xdrip.isRunningTest()的具体用法。这些
本文整理了Java中com.eveningoutpost.dexdrip.xdrip.checkAppContext()方法的一些代码示例,展示了xdrip.checkAppContext()的具体用
本文整理了Java中com.eveningoutpost.dexdrip.xdrip.initCrashlytics()方法的一些代码示例,展示了xdrip.initCrashlytics()的具体用
本文整理了Java中com.eveningoutpost.dexdrip.xdrip.getApplicationContext()方法的一些代码示例,展示了xdrip.getApplicationC
本文整理了Java中com.eveningoutpost.dexdrip.xdrip.getAppContext()方法的一些代码示例,展示了xdrip.getAppContext()的具体用法。这些
我是一名优秀的程序员,十分优秀!