cordova-plugin-network-information icon indicating copy to clipboard operation
cordova-plugin-network-information copied to clipboard

Network checking for online/offline is not executed when app is in backgroud mode

Open pedrofurtado opened this issue 5 years ago • 5 comments

pedrofurtado avatar Mar 13 '20 14:03 pedrofurtado

Hey Pedro

Indeed, the plugin does not check online/offline while being in the background. As far as I know, on Android there is no checking while being in the background. For ios, and other platforms I cannot answer the question.

Kind regards Pieter

PieterVanPoyer avatar Mar 28 '20 20:03 PieterVanPoyer

@PieterVanPoyer Thanks for feedback 👍

pedrofurtado avatar Mar 28 '20 23:03 pedrofurtado

cc @diegozurita

pedrofurtado avatar Mar 28 '20 23:03 pedrofurtado

I was testing in version 2.0.1 and if I can get the offline / online connection status in the background

KevinToala avatar Apr 19 '20 01:04 KevinToala

For ios, and other platforms I cannot answer the question.

iOS webviews don't execute javascript while the app is in the background, so processing background tasks within the webview is generally is difficult if not impossible. For example, the native code might send the event to javascript, but your app won't be able to respond to it until the app comes back into the foreground.

Apple generally discourages apps running code in the background except for very specific scenarios.

breautek avatar Jun 07 '20 15:06 breautek