How to detect movement of an android device?

后端 未结 6 1499
日久生厌
日久生厌 2020-12-04 09:51

I need suggestion about how to detect the amount of movement of an android device. Suppose I have put the phone on a table or bed and then if somebody taps the table or sits

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 10:49

    While I don't have demo code (since you aren't specific enough), a good start is here: http://developer.android.com/guide/topics/sensors/sensors_motion.html (and other items on the left).

提交回复
热议问题