问题描述:

I want to detect whether the phone is moving or just is shaked by people by using phone's sensor.But the sensor's result is very sensitive, its hard to distinguish between moving or shaking by orientation sensor or acceleration sensor and using some mathematic methods?

thanks a lot!

网友答案:

I'm not sure I understand the question - it sounds like you're trying to differentiate between the GPS and accelerometer? They're two different devices...

网友答案:

If you are trying to detect a distinct shake, i recommend using the accelerometer. Then, it is just a matter of detecting minimum speed with onSensorChanged().

The first search result on google for "android detect shake" brings me this: http://www.clingmarks.com/?p=25

Enjoy and please use search functions here and in google first before posting a thread.

相关阅读:
Top