I have a question about whether it is possible to ‘hear’ a beacon signal when an app is not running or neither in background.
For example, if a user enters a shop containing some beacons but the app on his smartphone is closed, is it possible to wake the app up in order to inform the user (e.g.: through a local notification)?
I'm particular interested to achieve this with iOS7, but it would be useful to know how it works under Android too.
Thanks a lot!
Thanks for the question!
In terms of iOS 7 the app could be shut down through the following ways:
The user shut downs the app in the multitasking interface - the app won't show notifications.
The system has shut down the app (memory issues or system restart) - it will show notifications again.
Note: After downloading the app from Appstore it has to be opened at least once to register for beacons.
To clarify further - my understanding is you can use region monitoring (i.e. GPS geofencing) to open an app from a closed state. In other words, while you can't open a closed app through detecting a beacon, you could use CLLocation Manager to discover that you've entered the geographic vicinity of a store and prompt the app to move into background.
This is the only way to open a closed app using location - but once the app is in background, you can let beacons 'do their stuff' correct?
that's a really bad news.. actually there's no need for GPS region notifications at all in any scenario.
The only way I see to be sure the user keeps the app in background is to periodically inform him via push or local notifications.
if what you say does really work, it would be a great solution in order to fully exploit the beacon functionality!
Otherwise we cannot assure the user has the app open while approaching a location and therefore the beacon wouldn't be recognized.
Have you performed any test about such scenario?
Luca - The guide is useful:
"The significant-change location service offers a low-power location service for devices with cellular radios. This service is available only in iOS 4.0 and later and can also wake up an app that is suspended or not running."
But also check out Proximity Kit from Radius. They have a nice neat way of managing geofencing and beacons all at once:
It seems that integrating Apple's low-power location service with the beacon technology could give the best solution; I'm having a look at Proximity Kit and trying to understand what they really offer, as it is not free.
To sum up, as you pointed out, location service+ibeacon is the solution, free :)
I've investigated the issue and here is what I found.
The method you described was possible with iOS6, cause apps could have been activated by location services even if they were shut down before (e.g. killed by a user).
In iOS7, if the app was shut down by a user it won't be activated again by the system, even if it's GPS region notification and not iBeacon.
According to our knowledge, unfortunately this could work only in the situation when the app was terminated by the OS.
Please check slide number 15 in the presentation: „What’s new with multitasking”:
Thanks Ola - yeah, it's so confusing and I feel like I've been misleading (or maybe misled by others!).
"Note, what I'm talking about is if the user explicitly kills the app in the app switcher. At that point the user has told us that this app should not be running, and we will honor that by not re-launching the app any more. If the app is terminated by the OS (e.g. due to memory pressure) then we will continue to launch the app for region monitoring. Hopefully that clarifies a bit.
And if the app is simply suspended (i.e. the user hits the home button to leave the app) then yes, we will continue resuming the app when regions are entered/exited. The only change in iOS 7 is if the user explicitly kills the app in the app switcher."
Now I need to check back in with our developer team! Eep!
Just to finally clarify - the method described above could work only in the situation when the app is terminated by the OS.
In that situation iBeacon notifications work as well, so there is no need for GPS region notifications.
Yeah Luca I feel the same way. Not an issue with Estimote but how Apple changed things with ios7 - I agree on the idea of push but it's not the ideal clearly.
I just did some testing with a slightly modified version of the NotificationDemo on my iphone 5s running iOS 7, testing against a real estimote beacon, and I saw the same behavior as described in the official answer.
As long as I didn't explicitly shut down the app via the multitasking the interface, I received beaconManager:didEnterRegion: callbacks as seen via local notifications. Even if I rebooted the device, the notifications persisted.
I modified the NotificationDemo to listen for my own estimote beacon:
ESTBeaconRegion* region = [[ESTBeaconRegion alloc] initRegionWithMajor:17957 minor:37680 identifier: @"B9407F30-F5F8-466E-AFF9-25556B57FE6D"];
I also modified the demo app to display a "Did Enter Region" and "Did Exit Region" image and local notification text rather than showing the (confusing) shoe images and sale terminology.
and to test I simply walked a few hundred yards away until I got the "Did Exit Region" local notification, and returned to the beacon and got the "Did Enter Region" local notification.
Just to bring this thread up to date, with 7.1, Apple will open your app for you if it detects a UUID that matches your app. The app only needs to be installed, it doesn't have to be running. You will need to add logic to your AppDelegate to answer the wake-up call.
thanks for the update, that's a really great news!
Thanks Mark for sharing the update!
Anyone of you succeed with this?
I mean, I'm trying to understand how to listen to beacons when the app is closed but nothing is working for me: - what method should in call in my appdelegate? - how can i wake up my application when a beacon is in range?
Is there any tutorial? I was checking on web, but didn't find any.
Thaaaank you so much, Wojtek! :D
What about Android? Can Android hear a beacon and open an app when app is closed?