Example code for gyroscope on Android devices