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]: No connectivity state updates sent when some connection type turns off #2672

Closed
8 tasks done
vbuberen opened this issue Mar 11, 2024 · 0 comments · Fixed by #2673
Closed
8 tasks done

[Bug]: No connectivity state updates sent when some connection type turns off #2672

vbuberen opened this issue Mar 11, 2024 · 0 comments · Fixed by #2673
Assignees
Labels
bug Something isn't working triage

Comments

@vbuberen
Copy link
Collaborator

Platform

Android 14

Plugin

connectivity_plus

Version

Reproduces as of

Flutter SDK

3.19.3

Steps to reproduce

  1. Run the example app with any connection type available (or multiple ones).
  2. Turn off this type of connection.
  3. No new event fired in the stream, so nothing changes on UI.

Checked with (wi-fi + vpn), just wi-fi, just mobile, etc. Always the same result.

connectivity_bug.mp4

I assume that it happens because in the broadcast receiver the NetworkCallback doesn't override all required functions available, so we are missing events.
Here is a documentation on NetworkCallback: https://developer.android.com/reference/android/net/ConnectivityManager.NetworkCallback

Will try to check if other functions Considering that while trying to fix the bug I will be modifying the code in the broadcast receiver part I will also take care of #2671 issue.

I am also curios for how long this issue exists in the plugin as I belive it was there and recent changes to connection type has nothing to do with it.

Code Sample

Plugin's example app without modifications

Logs

- No need to

Flutter Doctor

No need to

Checklist before submitting a bug

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
1 participant