안드로이드 개발 질문/답변
(글 수 45,052)
단말기 환경설정에 사용자가 setting한 값을 아래와 같이 읽을 수 있는 것으로 알고 있습니다.
String gs = android.provider.Settings.Secure.getString(getContentResolver(), android.provider.Settings.Secure.WIFI_ON);
하지만 기타 셋팅 "개발자 옵션 -> 활동 보관 안 함 " 혹은 "테더링 및 휴대용 핫스팟"의 셋팅값들이 설정되었는지 확인 할 수 있는
코드는 없을까요?
2012.07.24 15:54:08
개발자 옵션 -> 활동보관 안함은 이녀석 인가본데요
android.provider.Settings.System.ALWAYS_FINISH_ACTIVITIES
2012.07.24 16:08:06
(추천:
1 / 0)
try {
android.provider.Settings.System.getInt(getContentResolver(), android.provider.Settings.System.ALWAYS_FINISH_ACTIVITIES));
} catch (SettingNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
갤3에서 테스트해본 결과 (새폰) 활동보관 안함 전혀 건들지 않았을때는 SettingNotFoundException
체크한 후엔 integer 1
체크해제 한 후엔 integer 0
세팅값 가져올때 not found 예외처리도 신경쓰셔야 할듯하네요.




도큐먼트 상에 제공되어 있는 Constants 외에는 확인하기 어려울것 같습니다.
다만 꼼수들은 존재하나보네요.
테더링정보 관련해서는 아래 링크 참조하세요.
http://stackoverflow.com/questions/8007361/is-there-a-way-to-check-whether-tethering-is-active