weplenish / flutter-plugins

flutter plugins for interfacing with native implementations
MIT License
4 stars 7 forks source link

[wifi_flutter] Wifi channel and frequency #9

Open Jesus32cm opened 4 years ago

Jesus32cm commented 4 years ago

It's possible to get the Wifi channel and frequency?

vipero07 commented 4 years ago

Yes and no. On android it is possible, on iOS no... so while it could be implemented for android, it wouldn't be possible for iOS. That seems to be the case with most wifi connectivity things unfortunately.

vipero07 commented 4 years ago

https://github.com/weplenish/flutter-plugins/blob/0cbc7de513339ac862983ff476fd679ba83025b0/wifi_flutter/android/src/main/kotlin/com/weplenish/wifi_flutter/WifiFlutterPlugin.kt#L68

If you add new lines inside this mapOf

"channel" to network.channelWidth,
"frequency" to network.frequency,

That would get you what you are looking for. Though I imagine you only really want the frequency (since it tells you channel).