开发者

How to use/call gyros in the application for Android

开发者 https://www.devze.com 2023-03-12 18:36 出处:网络
I am working onMOTOROLA 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.

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

精彩评论

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

关注公众号