rebellion
rebellion

Reputation: 6740

How to detect someone passing a beacon

I'm testing out beacons from Estimote, and I'm wondering what's best practice when it comes to detecting someone passing one or multiple beacons?

Lets say I want to register when people are passing through a door, what is the best way to do that?

So far I think I could make a boolean flag which is initially set to NO, and detecting a region of beacons, setting it to YES when signal has gone from bad/non-existing to very good and back.

What are your thoughts about this? All feedback is much appreciated!

Upvotes: 0

Views: 339

Answers (1)

davidgyoung
davidgyoung

Reputation: 64916

This is very difficult to accomplish, mainly because of delays in beacon detection when an app is not in the foreground. Typically when a user enters a door, their device is locked and your app is not the foreground. In such a situation, it can take minutes to detect a beacon in the background.

This makes it very unlikely that your app will see the beacon until well after the user crosses the threshold.

Even if you can get a timely detection, iOS only lets you range for about five seconds in the background after entering a beacon region before suspending your app -- not enough time to measure signal levels as you cross a threshol. This is especially true considering the range of beacons is about 50 meters, meaning the five second window could start long before you even reach the door.

The only way to do what you suggest is to somehow get the user to have the app in the foreground so you can range constantly. But this seems unlikely.

Sorry, I know this is not the answer you want to hear. I have tried to do this several times at client request without success. The more realistic alternative is to rethink your bigger picture goal and find another way to accomplish it.

Upvotes: 1

Related Questions