Yes, Kyatric's example works well in my HTC EVO 3D, but in different browser it gets different result.
In chrome, if beta<0, sprite will up, else down. If gamma<0, sprite will right, else left.
But In FF, beta will inverse, greater than 0, sprite will up, else down. Gamma works same as chrome.
(C2 R141, Chrome 28.0.1500.94, Firefox 21.0, Android 4.0.3)