cordova-plugin-ibeacon
cordova-plugin-ibeacon copied to clipboard
Monitoring in background mode - Android
I'm using this plugin to monitor a couple of ibeacons, and it works great in background mode on iOS (even after killing the app!). But on Android I'm having no luck. After leaving it closed for a while Android seems to kill the app and stop monitoring.
I don't want to use katzer's background mode plugin as that always displays a notification, and when turning off that notification Android still kills the app.
Has anyone solved this issue?
I could not solve this issue with this plugin because background monitoring does not spawn a webview in which the javascript callback can be executed. I had to create a plugin that registered a sticky service in which all relevant functionality was natively executed. I then used a javascript interface to start and configure the service when the app ran.
mpk2 do you have an example of that plugin that you could share?
@halindrome Sure, although it's somewhat specific. Hopefully you'll be able to modify it for your needs:
https://github.com/Topl/cordova-beacon-background