How to read vibration setting android? -


is possible read vibration setting ringing?

i'm getting vibration state using:

if(audiomanager.getringermode() == audiomanager.ringer_mode_silent)     {         //silent     }     else if(audiomanager.getringermode() == audiomanager.ringer_mode_vibrate)     {         ringphone(callerring);         vibrator = (vibrator) getsystemservice(context.vibrator_service);         long[] pattern = { 0, 1000, 1000 };         vibrator.vibrate(pattern, 0);     }     else if(audiomanager.getringermode() == audiomanager.ringer_mode_normal)     {         ringphone(callerring);     } 

in case of ringer_mode_normal, want setting vibration on incoming call.

in android system settings, there option inside sound, "vibrate on ring". need read option inability.

any appreciated.

thanks

a little late, need same , solve by:

public static boolean checkvibreationison(context context) {     return (1 == settings.system.getint(context.getcontentresolver(), "vibrate_when_ringing", 0)); //vibrate on } 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -