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

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

  •  28-06-2022
  •  | 
  •  

Frage

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.

War es hilfreich?

Lösung

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

isEnabled will be true if Driving Mode enabled

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top