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

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

  •  28-06-2022
  •  | 
  •  

Pregunta

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.

¿Fue útil?

Solución

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

isEnabled will be true if Driving Mode enabled

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top