Samsung enable disable “Driving mode”

╄→尐↘猪︶ㄣ 提交于 2020-01-29 09:53:06

问题


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.


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!