Radius Networks Android IBeacon library - running a background service?

688 Views Asked by At

The documentation of the Pro library talks about "Auto launches app on iBeacon detection" which involves a bootstrap notifier. Which is nice, however, I suspect that if a user uses an app killer, this would stop the app nevertheless, whereas WhatsApp for example would still create notifications when messages are received. From what I know the use BroadcastReceiver and register for events.

Is that at all possible with this particular library ?

1

There are 1 best solutions below

0
On

If a user actively elects to kill an Android App using the Pro Android iBeacon Library, it will not run again until the user actively re-launches it, or the user restarts the device. This is part of the design of the Android OS and not really specific to any library.

It is possible to code your app to also auto restart on another system event or event sent by another app (see list of broadcast intents here), but these must be specific to your use case. Be very careful not to restart an app against the wishes of a user who has manually killed it, otherwise the user will probably uninstall the app very quickly. The Pro Android iBeacon Library limits restarting to ACTION_BOOT_COMPLETED for this reason.

Although I am unfamiliar with how WhatsApp is coded on Android, it operates under these very same constraints. If it does restart after being manually killed, it must do so in response to a similar system event.