This is a fantastic question, and a great opportunity for us to explain how re-launching from the terminated state works for Estimote Monitoring.
Estimote Monitoring on iOS uses two system frameworks under the hood to do its job: Core Bluetooth and Core Location. And actually, we primarily use Core Bluetooth, but the one problem with CB we run into is specifically about re-launching apps—it works much less reliably than with Core Location. Hence, we added Core Location to the mix, to make apps using Estimote Monitoring be reliably relaunched when entering range of beacons.
The thing is, for Core Location to relaunch the app, you need to completely leave the range of all your beacons for at least 30 seconds. Then, when you re-enter the range, the app should get relaunched. (Note that Estimote Monitoring broadcasting by default uses transmit power of -4 dBm, which can easily translate to 50-70-100 meters of range. This is independent of what
desiredMeanTriggerDistance you’ve set.)
This is usually not a problem at all in real-world situations: people leave the venue where the beacons are deployed, go home, play games on their smartphone, the app gets terminated due to memory pressure, then they come back to the venue the next day, and the app gets relaunched with no problems.
When developing your app however, it’s easy to remain in range of the beacon (even if the Estimote Monitoring triggered an exit, because the exit is only for your
desiredMeanTriggerDistance), and thus relaunching will seemingly not work properly.
Things you could try:
- kill the app
- move at least 100 m away from all your beacons
- wait at least 30 seconds
- move back to the beacon
- expect the event to fire
Alternatively, you can enable Flip to Sleep on your beacons, and instead of moving away from all your beacons, just flip them all to sleep for at least 30 seconds, then flip them back. This might be slightly less reliable though, because we optimized Estimote Monitoring against real-world scenario of people gradually moving toward the beacon and the signal strength increasing; and Flip to Sleep instead abruptly turns the signal off and on.