Comments (4)
Do you have a sample project you can reference?
from cordova-plugin-shake.
Closing due to inactivity
from cordova-plugin-shake.
I've also experienced the double shake problem on Android. Here's a project that reproduces the issue, along with using debounce
to work around it - https://github.com/dandv/meteor-shake/blob/master/example/client/example.js#L6
Note that @alexgibson's shake.js (shake detection for mobile browsers using the devicemotion API) also handles this problem by using a timeout (defaulting to 1000ms).
from cordova-plugin-shake.
I'm also running into this issue. For what it's worth, here is the code I'm using:
// Device Ready
document.addEventListener("deviceready", function() {
// http://plugreg.com/plugin/leecrossley/cordova-plugin-shake-detection
var onShake = function() {
console.log("Shake!");
nextLevel();
};
// Start watching for shake gestures and call "onShake"
// with a shake sensitivity of 40 (optional, default 30)
shake.startWatch(onShake, 30);
});
from cordova-plugin-shake.
Related Issues (20)
- ReferenceError: Can't find variable: cordova HOT 2
- Address the comments on the gist? HOT 3
- winphone have a strange behavior HOT 2
- Can't find variable: shake HOT 2
- shake finished HOT 1
- Class not found HOT 1
- This plugin is supported when implementing in Angular Ionic HOT 2
- Installed on phonegap app. cordova 6.4. plugin looks installed, but shake is not found HOT 2
- Doesn't work in iOs simulator HOT 4
- shake event not firing state change after state change shake is working in ionic can you please help me HOT 5
- onShake() not firing on iOS HOT 1
- Deprecation of cordova-plugin-device-motion HOT 1
- Check out Seismic for native Android shake detection
- Angular Animation not Working HOT 1
- On shake end
- Support for Cordova 9 HOT 11
- cordova-plugin-shake working on Android, but not iOS HOT 7
- iOS shake detection doesn't work HOT 2
- Background mode not working
- onShake() not working on Android 12 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-shake.