1

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.

pbelov
  • 445
  • 6
  • 20
  • What is "driving mode"? Do you mean whether your device is in a car dock? Do you mean whether the device appears to be in a moving vehicle? Do you mean something else? – CommonsWare Sep 17 '13 at 12:04
  • Whatever it is, it would not appear to be part of standard Android, as I do not see it on a Galaxy Nexus. You may need to see if a Samsung-published SDK addresses your issue. – CommonsWare Sep 17 '13 at 12:12
  • Seems to be I can get global preference value by `android.provider.Settings.System.getInt(context.getContentResolver(), s);` but I don't know what "s" string parameter should I use in this case. – pbelov Sep 18 '13 at 10:52
  • Here is the almost same question - http://stackoverflow.com/questions/15519370/samsung-enable-disable-driving-mode – pbelov Sep 24 '13 at 19:42

1 Answers1

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

isEnabled will be true if Driving Mode enabled

The-DC84
  • 46
  • 4