android - Knowing when a person has moved to the left (right) relative to last known position -


is there way in android programming know when person carrying android device has moved left/right [more shifting right/left] in reference last known position?

for example: if held android device left of me, moving right, app should tell me relative last position of device, has moved right.

there 2 different ways of doing this, maybe more.

you use compass find direction phone pointing @ start , end, , accelerometer tell way moved.

similarly use gps coordinates in lieu of accelerometer.

both of these methods might give false positives or might not pick up- first 1 you'd have false positives dues jerky movement (you'd have employ filtering or data useless) while second have issues there resolution of gps not tight enough (say within 10 feet of starting point). gps doesn't work indoors.

some devices won't have combination of sensors need. if more specific conditions , environment might able edit give better answer.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -