我为我的项目添加了摇动手势插件。为什么摇动事件不起作用phonegap?
这是我的代码:
<button onclick="myFunc()" id="round">Gesture Call</buttom>
<script>
function myFunction()
{
window.open("emcall.html");
navigator.vibrate([2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000]);
navigator.notification.beep(10);
}
function myFunc()
{
alert('shake working');
function onShake()
{
alert("shake success");
window.open("emcall.html");
}
function onError()
{
alert("errorq");
}
shake.startWatch(onShake,30,onError);
}
</script>
有些事情错在mycode的帮助我克服此问题。
你有没有下载shake插件? – wot
@ e4en yeah通过cli downloded –
它不工作的系统是什么?你尝试过别人吗? – ste2425