Hello,
I have made an icon on my KLWP and I am selecting the correct icon by:
$if(nc(bt)=2,Bluetooth_connected,if(nc(bt)=1,Bluetooth,Bluetooth_disabled))$
and I am selecting the color by:
$if(nc(bt)=2,gv(green),if(nc(bt)=1,#FF0000FF,gv(dark)))$
When I DISable Bluetooth, the icon does nicely change to "Bluetooth_disabled" with the correct color. Works as expected.
However, when I then ENable Bluetooth (I have a watch that immediately will connect), the icon does go to "Bluetooth" (i.e. Bluetooth is ON), but NOT go to Bluetooth_connected with the correct color.
For debugging, I do show the value of nc(bt) on my screen and it is 2 (not 1)!
If I switch the device off and back on again (not reboot, just off/on), the icon/color is updated. It appears that the update is not done when the screen is on.
I can also "force" an update by opening KLWP and close it again, but I should not have to do that of course.
I'm using a Samsung Galaxy S10+
I hope you can help.
(I have the same kind of thing for the WiFi and that works perfectly)