How to programmatically check, get and set touch settings in android phones? -


is possible programmatically various touch settings in android such as:

-> dial pad touch tones

-> touch sounds

-> screen lock sound

-> vibrate on touch

i have tried accessing various constants in system.settings, see no mention of constants touch settings. can provide me info on apis or constants use this?

use following check

-> dial pad touch tones:

boolean isdtmftoneenabled = settings.system.getint(contentresolver,         settings.system.dtmf_tone_when_dialing, 1) != 0; 

-> touch sounds:

boolean istouchsoundsenabled = settings.system.getint(contentresolver,         settings.system.sound_effects_enabled, 1) != 0; 

-> screen lock sound:

boolean islockscreensoundsenabled = settings.system.getint(contentresolver,         "lockscreen_sounds_enabled", 1) != 0; 

-> vibrate on touch:

boolean isvibrateontouchenabled = settings.system.getint(contentresolver,         settings.system.haptic_feedback_enabled, 1) != 0; 

you can use putint() api change values. hope helps.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -