开发者

How to use/call gyros in the application for Android

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜