Hi guys, I tried using shake plugin for my app, the code i wrote(actually the code I saw on official documentation page) is
const watch = this.shake.startWatch().subscribe(() => { alert('shake!'); }); watch.unsubscribe();
the error i keep getting is:
plugin.js:168 TypeError: Cannot read property ‘stopWatch’ of undefined
Can u help me see what am I missing here?
I think you need to set timeout in startWatch function. like this startWatch(100).
Could you please provide links to the plugins you are using here? What is this.shake?
this.shake
Hi guys, sorry for the late response, the error i did get is because it can only be tested on real device, didn’t figure out until I tested it on device!
Plugin i used is cordova-plugin-shake, sorry for bothering