Hi, community.

I am investigating device-motion plugin test failures on Android and I've found 
that if the device (or emulator) is still, no SensorChanged events is being 
raised. So the plugin adds accelerometer listener, waits for two seconds (no 
updates), removes accelerometer listener and then calls fail callback.

I've come up with three different approaches to solve this problem:

1. We can pend the tests for Android.
2. We can save latest accelerometer value and pass it if no SensorChanged 
events is fired in 2 secs. But this value can be outdated.
3. We can poll accelerometer continuously and don't add/remove listener. But I 
believe that this approach can drain device battery.

What do you think, guys? Which way is best for us?

Thanks,
Alexander Sorokin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to