1

we want to build an Android app.

For the idea we have, we need to know, if an user moved or not.

It is unimportant, if the user moved 3 or 10 meters (10 - 30 feet) but it should be more then a half meter (so more then 1,5 feet) - so the user should really leave its position, not only moving its hand with the phone into the opposite direction.

I know the android sensors, but I'm new to android programming and I need a little hint what is the best way to check, if the user moved or not.
GPS of wifi signal level is not an option, we want to use the typical android sensors the most phones have.

In this presentation, on page 8, it is mentioned, that not many devices use the gyroscope, but the data is from 2010.

Now we have 2012 - is it still true? What would go recommend to use?

Is there a framework which already solves this problem?

pb2q
  • 58,613
  • 19
  • 146
  • 147
Joergi
  • 1,527
  • 3
  • 39
  • 82
  • This is most likely close enough to be a duplicate of [this question](http://stackoverflow.com/q/6352681/62576) – Ken White Oct 13 '12 at 20:24
  • @KenWhite Yes, in some sense there are many duplicates of this type of question. – Ali Oct 13 '12 at 20:34
  • @KenWhite not really, because i don't want to really measure the distance, i just want to know, if you moved away from one, it doesn't matter how far, just that you moved... – Joergi Oct 13 '12 at 20:38
  • 2
    @Joerg: You want to know if it moved more than .5 meters, which is a measurement of **distance**. You have to measure the distance between where it was and where it is now to determine if it's moved more than a certain amount. – Ken White Oct 13 '12 at 20:41
  • hmmm okay, from this point of view you are right. but i just want to know, that somebody moved away from the position (and it's now life saving, if its 100% true or not) but i will have a look for @Ali answers and the video! thx anyway – Joergi Oct 13 '12 at 20:43

1 Answers1

1

... it should be more then a half meter (so more then 1,5 feet) - so the user should really leave its position, not only moving its hand with the phone into the opposite direction.

You can't make it. No matter what you do, I can always find a way to fool your ad-hoc workaround.

The reason is accuracy. I also give some alternatives at that answer what you could try instead, depending on your application.

Community
  • 1
  • 1
Ali
  • 56,466
  • 29
  • 168
  • 265