How long does it take to detect an iBeacon while region monitoring?
Asked Answered
D

1

10

Take this scenario: user has an iPhone in the pocket passing by an iBeacon. Her phone is region monitoring for it. How much time is needed in real world to from entering the region to the moment app is woken up? I have found an excellent article on the subject by David G. Young (http://developer.radiusnetworks.com/2013/11/13/ibeacon-monitoring-in-the-background-and-foreground.html) but I can't believe it can really take up to 15 minutes. That would mean that all iBeacon home automation scenarios are simply unusable because you won't neither wait 15 mitutes in dark room for lights to switch on neither you would switch on the lights by actively using an app. Door opening and locking is another situation where iBeacon would be unusable (and NFC would work much better here). Or am I missing something?

Dardani answered 22/1, 2014 at 10:38 Comment(6)
15 minutes is the worst case scenario I have seen. You will usually get faster response times. I am still researching the variables involved in why iOS sometimes waits so long between Bluetooth LE scans, and will publish my results when available. But preliminary evidence suggests that: (1) iPhone 5 devices are faster at detecting than iPhone 4S devices. (2) if your iBeacon is transmitting more than once per second, detection times are faster. I a would love to hear other folks share their answers, too.Iolaiolande
But what do you mean by "faster"? Even if it is one minute, not 15, it is still too slow for use cases described above. In other words, it seems Apple didn't design iBeacon for that scenarios. User is supposed to launch an app. (Or is awaking phone enough?)Dardani
I think it is likely that for the use cases above (where you want a guaranteed response within a second) the app has to be in the foreground. The best you might hope for in the background is a list of devices and conditions under which you can get a similar response time in the background.Iolaiolande
The whole iBeacon concept is that they are suppose to be passive. Aka if you don't get notified it's not the end of the world. So using them to turn on a light when you walk into a room won't work unless you have the app open and phone unlocked.Landgrave
In my experience, it takes anywhere from a second to never (rare but sometimes). In terms of different scenarios, entrance notifications are typically more responsive than exits, and similarly foreground more than background. Things may also depend on which callback method you're utilizing. Coincidentally I've actually experimented using iBeacons for both use cases discussed in this thread, i.e. lights and door. FYI for the door use case I'm currently exploring using CoreBluetooth instead, by having the door act as a peripheral.Halona
I have an app that ranges for an iBeacon. The app first grabs a list of know proximityUUIDs and registers them as monitored regions.Leatherleaf
L
2

I have an app that ranges for an iBeacons. It first grabs a list of couple proximityUUIDs and registers them as monitored regions. When the device enters that region, it takes just 1 to several seconds (iPhone 5S) to post me a local notification on didEnterRegion: event. When the app is in front, it starts ranging the beacon immediately in current region (if any) and updates happen in about one-second intervals. When the app is in background, ranging is not enabled, otherwise it would immediately report that the beacon is gone (if you leave its range). HOWEVER, It can really take up to 15 minutes (I've experienced this) for the device to post the didExitRegion: when in background in the worst case, when there is just significant location monitoring enabled combined with bad or no network. Otherwise it happens until about a minute.

Sorry, this didn't fit into a comment.

Leatherleaf answered 3/7, 2014 at 15:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.