0
votes

The reference application does not give any trace when the app is killed. I installed the app and started ranging, the beacons are detected. Now I put the app in background, the scanning happens once in 5 mins. Now I kill the app and the scanning stops and does not start. Should I follow some other steps to make the reference app work?

1

1 Answers

0
votes

Killing an app with the task switcher will indeed stop scanning for beacons, at least temporarily. The Android Beacon Library is designed to resume scanning by watching for power connected, power disconnected and reboot events. Since most people charge their phones at least once per day, this means the a user-terminated app will resume scanning for beacons within the next day.

You can read details about this here:

http://altbeacon.github.io/android-beacon-library/resume-after-terminate.html

While it is possible to configure an app's manifest to listen for other events that would restart scanning for beacons sooner, you should be careful about doing this. If a user has terminated the app in the task switcher, they have indicated they do not want the app running, perhaps to save battery or other system resources. The library is designed to wait until the device is rebooted or connected to a charger before restarting, because these events are typically associated with the beginning/end of the user's day.