nc(wifi) does not correctly return WiFi status

Hello,

I have been trying to create a widget that updates based on whether I am connected to WiFi or not and while it works just fine in the editor, the widget itself shows inconsistent results. It tends to update correctly when checking for the WiFi being disabled, but has shown to only work sometimes when checking for the WiFi state to be connected.

Sometimes it will work, only for it to stop working again after locking and unlocking my phone, but strangely enough if I open the widget up again in the editor and re-save it, the widget starts working again momentarily before showing inconsistent results again.

I have tried looking this problem up and based on those results I changed how battery optimisation works with KWGT but that did not fix anything. After posting on reddit a few other users remarked that this appeared to be a problem with version 3.4.4 of the app and downgrading to 3.4.3 fixed it for them. Is this an issue that can be fixed in the next update?

i also experience this, very inconsistant results which kinda makes the feature useless for me as things are hidden/shown based on network connection.

I was having the same problem, but then i learned that kwgt uses the location services to determined the wifi status. My permission setting was only allowing kwgt to use the location service while the app were open. When it went to the background, it stopped using the service and the wifi status went back to enabled.The solution for me was just allowing kwgt to use location all the time. You should try it.

Thank you. But I can not find any KWGT permission setting for using location all the time ????

Go to your settings >> apps >> search for the "Kustom Widget / KWGT" app >> permissions >> Location >> then change for all the time.

I'm using one ui 3.0, if you're on an different rom, the path should be similar.