I'm using this in an enterprise android app that is deployed only through hockeyapp. I've been using it for about 2 months and getting pretty good results, however I am running in to some problems.
When the phone is getting only light use, this plugin appears to do the trick and the app will remain running for days. However, if I move away from the app, launch chrome, and then visit maps.google.com then I can consistently break it.
Here is what i do:
Launch my app and call window.plugin.backgroundMode.enable().
Move away from the app. My callback for onactivate is called and I see the notification banner that my app is still running.
Launch chrome, open maps.google.com. Wait for the entire page to load. At this point, my app is no longer running.
The notification banner is still up, but now it is missing the text. Tapping on the notification banner does nothing. My app is still listed in the recent apps list, but it is not running. If I tap on the app from the recent apps list, then my app opens and restarts, but the notification banner is still not working. I must exit the app and restart to get back in to a proper state.
I've been attempting to debug this with ddms, but I'm I don't know what to look for. I see this whenever the error occurs, but nothing else from the logs is jumping out at me.
01-06 14:57:55.992: I/NotificationMonitorService(1420): ID :-574543954 Relay is still running com.deliveryrelay.rider
01-06 14:58:11.127: I/ActivityManager(914): Process com.deliveryrelay.rider (pid 14369) has died.
01-06 14:58:11.127: I/WindowState(914): WIN DEATH: Window{43e585b0 u0 com.deliveryrelay.rider/com.deliveryrelay.rider.CordovaApp}
01-06 14:58:11.131: W/ActivityManager(914): Scheduling restart of crashed service com.deliveryrelay.rider/de.appplant.cordova.plugin.background.ForegroundService in 18527ms
01-06 14:58:11.148: I/NotificationMonitorService(1420): ID :-574543954 Relay is still running com.deliveryrelay.rider
01-06 14:58:21.198: A/ProcessStats(914): Starting service ServiceState{437e9920 de.appplant.cordova.plugin.background.ForegroundService pkg=com.deliveryrelay.rider proc=437e9920} without owner
01-06 14:58:21.336: A/ProcessStats(914): Starting service ServiceState{437e9920 de.appplant.cordova.plugin.background.ForegroundService pkg=com.deliveryrelay.rider proc=437e9920} without owner
01-06 14:58:21.929: A/ProcessStats(914): Starting service ServiceState{437e9920 de.appplant.cordova.plugin.background.ForegroundService pkg=com.deliveryrelay.rider proc=437e9920} without owner
01-06 14:58:22.112: A/ProcessStats(914): Starting service ServiceState{437e9920 de.appplant.cordova.plugin.background.ForegroundService pkg=com.deliveryrelay.rider proc=437e9920} without owner
01-06 14:58:22.447: A/ProcessStats(914): Starting service ServiceState{437e9920 de.appplant.cordova.plugin.background.ForegroundService pkg=com.deliveryrelay.rider proc=437e9920} without owner
I'm on version 0.6.2 and the OS is 4.4.2, but I've seen this on a couple of differen OS versions.
Here is what the notification looks like after an error:
I'm using this in an enterprise android app that is deployed only through hockeyapp. I've been using it for about 2 months and getting pretty good results, however I am running in to some problems.
When the phone is getting only light use, this plugin appears to do the trick and the app will remain running for days. However, if I move away from the app, launch chrome, and then visit maps.google.com then I can consistently break it.
Here is what i do:
The notification banner is still up, but now it is missing the text. Tapping on the notification banner does nothing. My app is still listed in the recent apps list, but it is not running. If I tap on the app from the recent apps list, then my app opens and restarts, but the notification banner is still not working. I must exit the app and restart to get back in to a proper state.
I've been attempting to debug this with ddms, but I'm I don't know what to look for. I see this whenever the error occurs, but nothing else from the logs is jumping out at me.
I'm on version 0.6.2 and the OS is 4.4.2, but I've seen this on a couple of differen OS versions.
Here is what the notification looks like after an error: