Closed Yukari-Tryhard closed 5 months ago
Hi @Yukari-Tryhard
Note that the plugin relies on the Android OS reporting from the ConnectivityManager
network capabilities. So if the OS decides to report it has mobile
there is nothing we can do about it.
Turn off mobile network
What do you do exactly? i.e. which setting do you turn off in your phone
HyperOS android 14
Do you have this issue with other Android devices?
What do you do exactly? i.e. which setting do you turn off in your phone I turn off mobile data on my real device. Not the emulator
Do you have this issue with other Android devices? No i don't. As far as i know for now android 12 work fine. I'll do a test later on other android device.
Just a suggestion do you have any page for which version of android or OS it compatible with. Cause when i trouble shooting connectivity_plus i have no idea if it's my fault or it's package fault or it's OS fault
This looks like is the OS fault, or to be precise, HyperOS implementation (is that from Xiaomi?).
We cannot keep track of which device works and not, that would be impossible.
If this was something that happened on all devices, then we would surely investigate the issue. But since only happens on this specific one, there is nothing we can do.
Once thing that I have noticed testing on my device (Pixel 5) is that changes in WiFi trigger a connectivity change event, e.g. it changes from ConnectivityResult.wifi
to .mobile
. However, disconnecting from mobile data doesn't trigger this change, and instead I need to force update the connectivity value, then it correctly reports ConnectivityResult.none
.
So while checkConnectivity
seems correct, onConnectivityChanged
is not reporting mobile changes correctly.
I will check if there is something that could be improved in the plugin code, or if this is an Android issue.
Can you confirm if checkConnectivity
works as expected?
Platform
Android 14
Plugin
conectivity_plus
Version
6.0.2
Flutter SDK
3.16.7
Steps to reproduce
Code Sample
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean