How to find out when an Android phone is moving?

Well, this thing has been listening to me all day. I developed an application that checks that a person is moving or not, to check his activity. I used the accelerometer for this because gps may not work indoors. The question is, even if the phone stands still ... does the accelerometer change? I do not know why? This rarely happens. But it needs to be checked. Should I use something else to get linear acceleration? Please help me.

+5
source share
1 answer

It may be a noisy sensor, or it may be a vibration from something that you cannot notice that causes a change event. You must set a threshold for what you consider a movement and use it to filter events that enter.

+2
source

All Articles