Make Your Windows Phone Vibrate with PhoneGap

DZone 's Guide to

Make Your Windows Phone Vibrate with PhoneGap

· Mobile Zone ·
Free Resource

The Windows Phone SDK in Silverlight provides the class VibrateController which the developer can use to make the phone vibrate.

All that the developer has to do is create an instance of the VibrateController and call the start method with the timespan.

VibrateController vibrate = VibrateController.Default;

Check How to make a Windows Phone 7 Vibrate using C# to learn more.

Similarly, PhoneGap provides the notification.vibrate method to make your Windows Phone vibrate.

The navigator.notification.vibrate takes one argument i.e the milliseconds to vibrate your Windows Phone.


<script type="text/javascript">

function Button1_onclick()

{ navigator.notification.vibrate(20000) }




Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}