Thursday, May 1, 2014

iBeacon Various test cases and results

Part of an application testing did the below experiments to find out the details of iBeacon functionality

1. First of all, it needs devices with Bluetooth 4.0. This means that it can only be tried one iPhone 4s or later, iPad 3rd generation or later, iPad mini first generation and later, iPod touch 5th generation. Installed on iPhone 4, it appears that the functionality doesn't work!.

2. Second hitch is that, the region monitoring doesn't work if the app is not running. The region monitoring get invoked only if the app is running in either foreground or background.

3. When app display is turned on, it quickly gives the call back saying that app entered beacon range. This callback comes very quickly.

4. When app is in the background but user explicitly turned off the backlight, or the backlight gets turned off, application is not getting the call back immediately. Looks like there is a minimum time interval after which the scanning of beacon begins after the backlight is turned off.

5. There seems to be an option to turn off the background refresh from Geneal -> Background App Refresh and the iBeacon apps get listed in this as it appears.

6. Having internet connection or WiFi connection doesn't look to be affecting this functionality.

7. One time it is found that after even for 10 minutes, even though I was on the vicinity of the beacon, the backlight did not turn on and neither it was not posting notifications or app was not getting invoked. This make me feel that it is unreliable a bit!

Tried the above all in an iPhone 5S device, the latest and greatest i could get as of this writing. And used the AirLocate app to test these.

Also noticed Apple documentation that is relevant with this

"When testing your region monitoring code in iOS Simulator or on a device, realize that region events may not happen immediately after a region boundary is crossed. To prevent spurious notifications, iOS doesn’t deliver region notifications until certain threshold conditions are met. Specifically, the user’s location must cross the region boundary, move away from the boundary by a minimum distance, and remain at that minimum distance for at least 20 seconds before the notifications are reported."


The specific threshold distances are determined by the hardware and the location technologies that are currently available. For example, if Wi-Fi is disabled, region monitoring is significantly less accurate. However, for testing purposes, you can assume that the minimum distance is approximately 200 meters.

Having read this, did the below test:

- Moved away from the Beacon more than 200 metres (climbed down the steps to the first floor of my 5 floor apartment and climbed up to the door back again. Nearing the door, the beacon notification fired up !!). So in practical use cases, the functionality could be reliably used.


Like me, it appears that there are many developer out there discussing the same, like the ones below:
http://stackoverflow.com/questions/23146629/ibeacon-reliable-unreliable



References:
http://developer.radiusnetworks.com/2013/11/13/ibeacon-monitoring-in-the-background-and-foreground.html

No comments:

Post a Comment