1. Introduction :


Android has got a lot of features which all of us know and in every tutorial i am using one of it to make our app’s and this time i have brought a vibration tool which you might have experienced a lot of times.

Yes, you are right vibration is not only a feature of android but you can also find it in many basic devices.Here, we are going to see how to implement it in android.

Generally vibration mode is used to notify user regarding any message, phone call, when we deactivate sounds i.e., ringtones and also for any other notifications which may include alert / error messages.

So here i think i now you got a basic knowledge regarding vibration mode, or uses of vibration, so we can move forward.

2. Creating activity_vibrate.xml :


Its a simple interface where just we require a button.


3. Creating a VibrateActivity.java :


 Here we will be using vibrator service which is a part of system services in android.



4. AndroidManifest.xml :


We need to add a permission for vibration. 



5. Output :


Share article on

Show Buttons
Hide Buttons

June 25, 2017

Attention Required! | Cloudflare

One more step

Please complete the security check to access push.wppush.co

Why do I have to complete a CAPTCHA?

Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.

What can I do to prevent this in the future?


If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.

If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.

Clear all
Read previous post:
Android spinner drop down arrow color change