Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: networkStatusChange is triggering the event when changing the wifi frequency #2138

Open
1 of 3 tasks
Magrelinho opened this issue Jun 19, 2024 · 1 comment
Open
1 of 3 tasks

Comments

@Magrelinho
Copy link

Magrelinho commented Jun 19, 2024

Capacitor Version

Latest Dependencies:

@capacitor/cli: 6.1.0
@capacitor/core: 6.1.0
@capacitor/android: 6.1.0
@capacitor/ios: 6.1.0

Installed Dependencies:

@capacitor/ios: not installed
@capacitor/cli: 6.1.0
@capacitor/android: 6.1.0
@capacitor/core: 6.1.0

Other API Details

Angular CLI: 18.0.4
Node: 18.20.2
Package Manager: npm 10.7.0
OS: win32 x64

Angular: 18.0.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1800.4
@angular-devkit/build-angular   18.0.4
@angular-devkit/core            18.0.4
@angular-devkit/schematics      18.0.4
@angular/cli                    18.0.4
@schematics/angular             18.0.4
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.7

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

networkStatusChange is triggering the event when changing the wifi frequency
this.networkListener = Network.addListener('networkStatusChange', (status: { connected: boolean }) => {
console.log(Network alterado: ${status.connected ? 'Online' : 'Offline'});
});

Expected Behavior

Only trigger the event when changing the connection type

Project Reproduction

https://github.com/Magrelinho/networkStatusChange

Additional Information

Screenshot_20240619_133739
Screenshot_20240619_133840

@Scooby27
Copy link

The networkStatusChange listener is not triggering when network goes from online to offline or vice versa on Android. iOS and web work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants