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

fix: multiple triggering issue of NetworkCallback on Android 10 #344

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

weitsai
Copy link
Contributor

@weitsai weitsai commented Aug 30, 2023

In Android 10, there is an issue where connection failures lead to repeated attempts to reconnect, resulting in the NetworkCallback being continuously triggered. However, within the context of Flutter, the FlutterResult allows only one return. To address this problem, it is recommended to unregister the NetworkCallback upon the first occurrence of the onUnavailable or onLost event, preventing subsequent redundant invocations. This pull request aims to implement this solution.

@weitsai weitsai changed the title Fix multiple triggering issue of NetworkCallback on Android 10 fix: multiple triggering issue of NetworkCallback on Android 10 Aug 30, 2023
@daadu
Copy link
Member

daadu commented Aug 30, 2023

+1 for the PR.

The project is a bit outdated - needs a bit of cleanup - will merge this on coming weekend.

@weitsai
Copy link
Contributor Author

weitsai commented Aug 30, 2023

+1 for the PR.

The project is a bit outdated - needs a bit of cleanup - will merge this on coming weekend.

Thank you for your assistance, and I appreciate you creating this toolkit.

@daadu daadu merged commit b7b61fc into flutternetwork:master Sep 4, 2023
2 of 9 checks passed
@daadu
Copy link
Member

daadu commented Sep 4, 2023

The fix has landed on pub.dev with wifi_iot: ^0.3.18+1.

Thanks for contributing, check yourself in CONTRIBUTORS.md file!

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

Successfully merging this pull request may close these issues.

None yet

2 participants