Android Gyroscope examples?

眉间皱痕 提交于 2019-11-26 17:47:41

问题


I'm sure this has been asked here many times but, are there any examples on the Internet about gyroscope Android development. Because the Gyroscope intrigues me and I think it could make for a pretty good thing to work with. I am just guessing the Samsung Galaxy S has a gyroscope, right? I hope so. Again though, my main need is for a tutorial, maybe even a good android programming tutorial/book (not just gyroscope related). I learned Java just for the purpose of Android development. I already knew C and a little OBJ-C so learning Java took a few weeks. So, one more time does anyone know any really good tutorials/books for Android development (I found a few tutorials on you-tube but their quality were so terrible I couldn't follow along) and maybe a good gyroscope tutorial for Android and a list of Android phones that have gyroscope built-in.


回答1:


Yes, all this has been asked before, and it's hard now to decide what a duplicate of is, because of so many questions here. Please, use the search box before posting questions, and ask one single question per post. Thanks.

Now, to answer your questions:

Books:

  • https://stackoverflow.com/questions/1114287/good-book-for-beginning-android-development-closed
  • Best Android 2.0 development book?

Sensors:

  • Android Gyroscope tutorial or sample code
  • Android accelerometer
  • http://www.helloandroid.com/tutorials/using-android-phones-sensors
  • http://stuffthathappens.com/blog/2009/03/15/android-accelerometer/
  • http://dansabin.com/2010/10/19/accelerometer-tutorial-for-android-1-6/
  • http://www.ibm.com/developerworks/opensource/library/os-android-sensor/index.html?ca=dgr-lnxw09Android-Sensors&S_TACT=105AGX59&S_CMP=grlnxw09

SGS:

Yes, it has accelerometer and compass sensors: http://www.phonearena.com/phones/Samsung-Galaxy-S_id4522




回答2:


You can check-out my simple demo-application which not only uses the Gyroscope, but also Rotation-Vector and Sensor-Fusions in order to rotate a cube.

https://bitbucket.org/apacha/sensor-fusion-demo

You can take the sensor-code from there and use it in an application of your choice.



来源:https://stackoverflow.com/questions/5774496/android-gyroscope-examples

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!