Closed breautek closed 4 years ago
In the issues, from time to time there are questions about events in the background. If I read the code, I think that ios stops dispatching events when the app is in the background. This is also true for the android setup.
Maybe this should be mentioned in the Docs? It should solve/clarify issues like: https://github.com/apache/cordova-plugin-network-information/issues/102
Kind regards Pieter
@PieterVanPoyer Do you know if this only applies to the iOS platform? I know Android does allow javascript execution in the background unlike iOS (unless if this was changed in WKWebView
... not 100% sure), although execution is throttled.
Basically wondering if it should be added as a general note or an "iOS Quirk".
Basically wondering if it should be added as a general note or an "iOS Quirk".
Can be added as a general note (for ios and android). In Android the javascript might execute, but the native broadcastreceiver is unregistered : https://github.com/apache/cordova-plugin-network-information/blob/9f8527062776ead04982d7fab12875a66bf69855/src/android/NetworkManager.java#L140-L143
So no change from network is detected.
Can be added as a general note (for ios and android).
I added it under a general Quirks
section, although I guess this suggest it may apply to the other 2 supported platforms (browser
and windows
), which I'm not sure if this does apply to those platforms or not... Maybe I should repeat the same text in both an Android Quirks
section and the iOS Quirks
section?
It does also seem to be true for Windows. https://docs.microsoft.com/en-us/uwp/api/windows.networking.connectivity.networkstatuschangedeventhandler?view=winrt-19041 Events are received while the app is active. But I am no Windows expert. For the browser part I have no idea. I would leave it like a general comment like you did, but it might not be completely correct for all the browsers, although Chrome lately has a freezing feature https://www.google.com/amp/s/www.techradar.com/amp/news/chromes-new-feature-will-stop-tabs-from-eating-all-your-ram-heres-how-to-try-it Looks great to me!
I'll leave it as a general quirk rule then. Thanks for your help!
Platforms affected
none (docs update)
Motivation and Context
Removes obsolete documentation that no longer applies for variety of reasons.
Description
Testing
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)