Android: How I can detect Driving Mode state on Samsung Galaxy S2, S3, S4 devices

StackOverflow https://stackoverflow.com/questions/18848971

  •  28-06-2022
  •  | 
  •  

문제

I want to detect is Driving Mode enabled/disabled state on my Samsung Galaxy S2, S3 or S4 devices programmaticaly, but I have no idea how I can do it.

P.S.: I mean: Settings > Language and input > Text-to-speech output > Driving Mode.

Please help.

도움이 되었습니까?

해결책

boolean isEnabled = Settings.System.getInt(getContentResolver(), 
            "driving_mode_on", 0) == 1;

isEnabled will be true if Driving Mode enabled

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top