javascript - Cordova/Phonegap shake gesture detection not working on ios simulator -


i testing out cordova plugin

https://github.com/apache/cordova-plugin-device-motion/blob/master/doc/index.md

i added plugin platform did:

cordova plugin add org.apache.cordova.device-motion 

then testing both on ios simulator , android 3.2 , android 4.1 real devices, on ios simulator seems not working, while on real devices works great.

is there limitation ios, or need know? or cause simulator can't emulate shake gesture?

as see pic there shake gesture emulation command :(

enter image description here

unfortunately don't have real iphone or ipad, knows if on real ios device plugin works same?

my code simple:

 $ionicplatform.ready(function () {    navigator.accelerometer.watchacceleration(function (acceleration) {          console.log('acceleration x: ' + acceleration.x + '\n' +               'acceleration y: ' + acceleration.y + '\n' +               'acceleration z: ' + acceleration.z + '\n' +               'timestamp: '      + acceleration.timestamp + '\n');         }, function (err) {          console.log(err + ' --------watching err');       }, {         'frequency':1800       });    }); 

simulator's shake won't recognized code (or accelerometer code), simulator shake triggers shake event, doesn't update accelerometer data


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -