I am running Cordova on Android and this is my config file.
config.xml
& lt; Feature name = "vibrate" & gt; & Lt; Param name = "android-package" value = "org.apache.cordova.vibration.vibration" /> & Lt; / Feature & gt; & Lt; Feature name = "media" & gt; & Lt; Plugin name = "media" value = "org.apache.cordova.AudioHandler" /> & Lt; / Feature & gt; & Lt; Feature Name = "Notification" & gt; & Lt; Param name = "android-package" value = "org.apache.cordova.Notification" /> & Lt; / Feature & gt;
AndroidManifest.xml
& lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.VIBRATE" />
my js
navigator.vibet (1000);
I use normal jQuery (not jQueryMobile) to run with Cordova. Vibration plugin is already installed by command line from this page.
But vibrations are not working.
I know this is an old thread, but, while testing on a device, make sure that The device is un-silent many (most) instrument vibrations as well as the audio "mute". If you are debugging in the browser, you should see 'vibration for 1000ms'. In the console, which tells you that the plugin is working (obviously you can not vibrate your computer). But, again, when tested on one device, make sure it is not muted.
Comments
Post a Comment