I'm required to capture the yaw, pitch, and roll Euler Angles at 50Hz (50 times a second) for my device (app limited to iPhone 5 and above, and also high end Samsung Galaxy S series).
I can see these values can be achieved through the browser and HTML5 - W3 seems to imply 60Hz can be achieved through the browser to the device. DeviceOrientation Event Specification
I had thought that Device Orientation - Apache Cordova may give me these details - but is only the compass. Is there a plugin which can give access to the Euler Angles - or would the inbuilt browser API values be considered a good enough? Considering the frequency we need to ping for accelerometer dictates high end devices, that we can safely assume the browser used by PGB would have this browser access for these values?
I would use the webview's implementation in this case. Be sure to look at http://caniuse.com/#feat=deviceorientation for important information regarding partial support and differences between webviews.
The link I provided also shows what OS versions have support. If you are in any way unsure, you could always test for the existence of the feature and bail if it wasn't present.
Yes, I tried implementing the webview approach but realised it was on an event, but it wasn't exactly the data I required from the device sensors.
Ultimately, I've simply forked the apache device motion plugin and added further requests for sensor data at the same frequency as the accelerometer - keeping both the platforms extracting sensor data natively has been the easier solution, and potentially the more reliable.
I didn't realise that PGB could link to github directly for plugins - this has made changing the Android and iOS source a lot quicker and easier.