Can the vibration setting for a call be read?
I get the 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 the case of RINGER_MODE_NORMAL , I want to set the vibration setting for an incoming call.
In the Android system settings there is an option inside Sound, "Vibrate on ring". I need to read this opportunity for failure.
Any help would be appreciated.
thanks
user1982396
source share