I am working on MOTOROLA XOOM for app. dev开发者_StackOverflow中文版elopment. I want to use gyros sensor in my application. If someone can help me out to call gyros in my program.
Thank you,
Use SensorManager
, to register a SensorEventListener
for the default Sensor.TYPE_GYROSCOPE
sensor. Your SensorEventListener
will receive SensorEvent
objects in onSensorChanged()
. There, you can read the angular speed around the X/Y/Z axes from the SensorEvent
. Details of the angular speed data can be found in the documentation for SensorEvent
.
精彩评论