Unable to detect Beacon when Device already in Beacon range & then we turn on Bluetooth & application is killed

615 Views Asked by At

I have implemented Beacon with local notification. Every thing works fine for the case when bluetooth in ON & then device enters the beacon range & app is in "Not running" state. But, when device is already in Beacon range & then Bluetooth is turned ON, no delegate gets called. Is it a limitation or am I missing something?

1

There are 1 best solutions below

0
On

This is a limitation of the Core Location framework.

When an application is terminated "Not Running" state, it can be re-launched due to location manager region didEnter / didExit region events. Your location manager will not receive region enter / exit events if you toggle your Bluetooth on and off while the application is terminated. The only way you'll be able to get didEnter / didExit events to fire is by physically entering or exiting one of your beacon regions by crossing their detection threshold.

  • Terminated apps will wake up on region didEnter / didExit events.

The region monitoring service delivers events normally while an app is running in the foreground or background. (You can use this service for both geographic and beacon regions.) For a terminated iOS app, this service relaunches the app to deliver events.

  • Beacon ranging will not wake up your app.

(If the beacon region’s notifyEntryStateOnDisplay property is true, waking the device causes the app to range for beacons for a few seconds in the background.) This service does not relaunch iOS apps that have been terminated; however, you can be relaunched by monitoring beacon regions using the region monitoring service.