Reputation: 1091
I have a Cordova app, which I'm building for both iOS and Android. I'm using the HTML5 DeviceOrientation API (https://w3c.github.io/deviceorientation/) to obtain the device's orientation.
I install an event listener for "deviceorientation", and then process the event.alpha/beta/gamma values to determine orientation.
This works fine on iOS, but on Android it doesn't work. On Android, the "deviceorientation" event occurs only once, and the alpha/beta/gamma values are all null. Changing orientation after that does not result in any new events.
Has anyone experienced this? Any pointers on how I can debug?
Upvotes: 2
Views: 359
Reputation: 31
I ran to the same problem last year... Finally I found a forum topic where I read that the J3 doesn't have a real compass.
Upvotes: 1