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.
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
来源:https://stackoverflow.com/questions/15519370/samsung-enable-disable-driving-mode