Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know when the android phone is moving?

Well,This thing has bugged me for days. I have developed an app that checks that the person is moving or not to check his activity. I have used accelerometer for that because gps might not work under premises.The ques is that even if the phone is standing still..the accelerometer value changes?I don't know why?It does happen rarely. But this needs to be checked. Should I use something else just to get the linear acceleration? Please help me out.

like image 477
Payal Avatar asked Nov 04 '22 15:11

Payal


1 Answers

It could be a noisy sensor or it could be vibration from something you can't notice that is causing the change event. You should set a threshold for what you consider movement and use that to filter the events that come in.

like image 190
Douglas Jones Avatar answered Nov 15 '22 00:11

Douglas Jones