1
Android KitKat 4.4에는 배터리 절약 모드가 있습니다. 배터리 수명을 줄이기 위해 GPS 및 기타 기능을 최적화합니다. 휴대 전화가 배터리 절약 모드에 있는지 여부를 확인할 수 있습니까?kitkat의 배터리 절약 모드 확인 4.4
Android KitKat 4.4에는 배터리 절약 모드가 있습니다. 배터리 수명을 줄이기 위해 GPS 및 기타 기능을 최적화합니다. 휴대 전화가 배터리 절약 모드에 있는지 여부를 확인할 수 있습니까?kitkat의 배터리 절약 모드 확인 4.4
도움이 만 19+ API 수준에서 사용할 수 있음을 유의하시기 바랍니다해야 다음은
private void checkLocationModeSettings() {
int mode = Settings.Secure.getInt(getContentResolver(), Settings.Secure.LOCATION_MODE,
Settings.Secure.LOCATION_MODE_OFF);
switch (mode) {
case Settings.Secure.LOCATION_MODE_SENSORS_ONLY:
Log.d(TAG, "Sensor only mode");
break;
case Settings.Secure.LOCATION_MODE_BATTERY_SAVING:
Log.d(TAG, "Battery saving mode");
break;
case Settings.Secure.LOCATION_MODE_HIGH_ACCURACY:
Log.d(TAG, "High accuracy mode");
break;
case Settings.Secure.LOCATION_MODE_OFF:
default:
Log.d(TAG, "Location access is disabled");
}
}
감사합니다. @shoe rat :) – user1002448
무엇 배터리 절약 모드? 삼성 관련 기능에 대해 이야기 해 주시겠습니까? Google의 주식 KitKat에는 그러한 것이 없습니다. – casraf
@ChenAsraf, AFAIK, OP는 "위치 모드"설정에 대해 이야기하고 있습니다. 세 가지 옵션 중 하나가 "배터리 절약"입니다. – ozbek