In one of my android apps, I need to enable or disable the vibration completely irrespective of the mode (i.e. silent or general or loud).
I am currently using the f
Check this, i found that as the first google result. The code:
if(isVibrate){ Vibrator vib = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); vib.vibrate(500); Toast.makeText(this, "vib started", Toast.LENGTH_LONG).show(); } else{ // do nothing }