You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to access the wifi info from the TaskHandler I always get a null value though. I'm not sure if there is a general issue with calling native code via a MethodChannel from a TaskHandler or if it's something specific to do with activity aware plugins.
Maybe I should be accessing the wifi info from receivePort.listen and only using the sendPort in the TaskHandler to indicate that the main thread should be accessing the wifi info?
The text was updated successfully, but these errors were encountered:
When your app is in the background, it doesn't have an Activity object. The plugin you introduced is implemented so that null is always returned if there is no Activity object. - Line45
Try implementing it using flutterPluginBinding.applicationContext in onAttachedToEngine function instead of binding.activity.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I want to access the Wi-Fi SSID, BSSID and RSSI from my TaskHandler so I can measure how the wifi strength varies over time. In the
onEvent
method of myTaskHandler
I'm callingWifiInfoAndroid.getWifiInfo
which is from thewifi_info_android
plugin. The code for that is pretty simple, it can be found here: https://github.com/sol-x/wifi_info_android/blob/main/android/src/main/kotlin/co/solx/wifi_info_android/WifiInfoAndroidPlugin.ktWhen trying to access the wifi info from the TaskHandler I always get a
null
value though. I'm not sure if there is a general issue with calling native code via aMethodChannel
from aTaskHandler
or if it's something specific to do with activity aware plugins.Maybe I should be accessing the wifi info from
receivePort.listen
and only using thesendPort
in theTaskHandler
to indicate that the main thread should be accessing the wifi info?The text was updated successfully, but these errors were encountered: