get vibrate() to work in browser without PhoneGap

Does anybody know how to get something like navigator.vibrate() to work directly in the browser on a website (without using PhoneGap and the webview)? None of the commands found on seem to work and all I could find are references to these commands working using PhoneGap. I have tried this fiddle here:

but no joy! :-(

I am running Android 2.3, native browser, Firefox 10 and Maxthon 2.4.5 on an HTC Sensation XE. Does anybody know of a browser that supports this method (already)?



Using Javascript:




where 250 = 250 ms vibrate.

But - this is not fully supported across all browsers (Namely not by Safari). Check Browser Support for Reference:


It depends on the browser, currently I've only found firefox mobile beta to support the vibrate API. You can find an example showing how this works here.

Basically you just have to make the following call:



Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.