2

I would like to enable/disable Driving mode which is available on some Samsung devices (Galaxy S2, S3). I know I have to put something to system settings, but I don´t know what. So please advice me what values I should use or where I can find this information.

Settings.System.putInt(context.getContentResolver(), "something1", "something2");

Thank you in advance.

JiTHiN
  • 6,548
  • 5
  • 43
  • 69
Michal
  • 2,071
  • 19
  • 30

1 Answers1

3

Sure! This code works for me:

Settings.System.putInt(getContentResolver(), "driving_mode_on", 1); // To Enable
Settings.System.putInt(getContentResolver(), "driving_mode_on", 0); // To Disable
Settings.System.putInt(getContentResolver(), "driving_mode_on", isEnabled ? 0 : 1); // To Toggle

Use this app to know settings name on your device: Display System Settings

The-DC84
  • 46
  • 4
  • Please replace your link to this link, because your link show it in IT and we all don´t understand : ) https://play.google.com/store/apps/details?id=de.SmartDyne.Free.DisplaySystemSettings – Michal Jan 24 '14 at 10:11
  • @ThomasDiCristofaro It doesn't work on s5, do you know how to do it with s5? – greywolf82 Jan 19 '15 at 19:49