apache / apache/cordova-plugin-network-information

Online event not firing on iOS or Android

Open
#79 3 comments 4 reactions 0 assignees View on GitHub
platform: android platform: ios support
Dominant language
Objective-C
Stars
465
Forks
339
PR merge metrics
No merged PRs in 30d

Description

Steps to repeat:
1. Create a Cordova/Ionic app.
2. Listen for onConnect events:
```
document.addEventListener('online', onOnline, false);
function onOnline() {
// This never fires
console.log('I\'m online!');
}
```

```
Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.2, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.4, (and 14 other plugins)

System:
Android SDK Tools : 26.1.1 (/Users/username/Library/Android/sdk)
ios-deploy : 1.9.4
ios-sim : 7.0.0
NodeJS : v10.13.0 (/Users/username/.nvm/versions/node/v10.13.0/bin/node)
npm : 6.4.1
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61
```

Contributor guide

Open the contributing guide

Research direction

Start with the document.addEventListener('online', onOnline, false) entry point and reproduce the report in the listed Cordova/Ionic setup on both iOS and Android. Trace the plugin's platform event handling and verify that the onOnline callback fires on each platform when connectivity changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript, objective-c
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.