Hi everyone,
I'm developing an app for wearable devices and I need gyroscope information.
This is my code:
if (window.DeviceOrientationEvent) {
document.getElementById("title").innerHTML = "DeviceOrientation";
window.addEventListener('deviceorientation', function(eventData) {
document.getElementById("title").innerHTML = eventData.gamma+' '+eventData.beta+' '+eventData.alpha;
}, false);
} else {
document.getElementById("title").innerHTML = "Not supported."
}
The event is supported as the title is set to "DeviceOrientation", the problem is that the event is never launched.
I tried rotating the emulator but nothing happens. I wanted t inject the event from the event injector interface but apparently it is not supported in the wearable sdk.
How can I have the rotation event launched? any idea?
Thanks!
Stefano