Hey,
This little code segment will let you vibrate your device whenever or wherever you want.
This little code segment will let you vibrate your device whenever or wherever you want.
Vibrator v = (Vibrator) this.getApplicationContext().getSystemService(Context.VIBRATOR_SERVICE); // Vibrate for 1000 milliseconds v.vibrate(1000);
For example, i used this code segment in my notification. First device vibrates then notification comes after that.
Simple and elegant :)If you have a question, ask me :)