How Vibrating Device

Hey,

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 :)

How to extract filename from Uri?

Now, we can extract filename with and without extension :) You will convert your bitmap to uri and get the real path of your file. Now w...