apache / apache/cordova-plugin-network-information
What exactly is triggering online/offline events?
- Dominant language
- Objective-C
- Stars
- 465
- Forks
- 339
- PR merge metrics
- No merged PRs in 30d
Description
What specifically is triggering the offline event?
What if a user is connected to wifi that has no internet? Or happens to be transitioning from Cell to Wifi....or transition between wifis. OR....the user connects to a wifi, but they must authenticate (guest internet) via a web url. In all these scenarios, the The wifi port is up...user is getting an IP address but can't get to the internet? What is being evaluated in a situation like this to determine if the user is actually online?
I have a very specific case where this has happened to a user and when launched my app went white screen. We could replicate this several times on iOS (like 1 out of every 10 times), but seemingly have never had a problem on Android (that I know of). The iOS user is def a rare case but I need to understand why this is happening so I can compensate for these scenario so my app doesn't hang on launch.
If the user loses internet while the app is launched then everything works fine.
Its only on app launch for iOS. I have ` document.addEventListener("online", function() {}) ;` at the top of my `deviceReady` section and it should fire during this odd situation...but its not....and the app is hanging.
Contributor guide
Research direction
The issue names the iOS path, document.addEventListener("online", function() {}) and the deviceReady entry point, but no source file or test. Trace how connectivity is evaluated during iOS app launch, compare the Android behavior, and reproduce the Wi-Fi/no-internet transitions; done should be a confirmed explanation of event timing and the launch behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, objective-c
- Domain
- mobile, networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100