02-21-2012 02:33 PM
Where can I find the WebWorks API for rotation/orientation/tilt? In other words, how can I detect programmatically the rotation of my Playbook around the three axes? Apps such as "What's up?" clearly use such an API. Thanks.
Solved! Go to Solution.
03-06-2012 01:38 PM
It sounds like you are looking for the DeviceMotion API to capture (x, y, z) motion.
Here's a demo:
Otherwise, if you are looking for portrait/landscape orientation, you can use the window.onorientationchange event:
03-06-2012 02:28 PM - edited 03-06-2012 10:38 PM
Thanks. I trust the BlackBerry DeviceMotion API also captures device rotation around the (x, y, z) axes? Will check out the demo later today.
Update: Yes, it works as expected. Nice....