Bluetooth not updating?

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)

hello?

Hello???

pffffffffffffffffffffffffff

People who see other complaining dont want to answer....buuuuut...you are lucky this time.

The problem can be resolving by putting your kode in a global and add #$df(s)$ to it

So it will be : $nc(bt)$#$df(s)$ (in a global)

And and for retake you use tc(split,gv(Bluetooth-connect),#,0)

If it doesn't help, tell it to me.

Hello, first of all, thank you to everyone who makes the Kustom project possible. It’s a great tool.

Now to the problem. I think my problem is similar to the thread creator’s.

I want the device name of my connected Bluetooth device to be displayed. However, the device name is only displayed when, for example, I open any app and then return to the home screen. Or I have to lock the smartphone first and then unlock it again.

Is this a bug in klwp or am I making a mistake?

I would be very happy if someone would like to help me. Thanks so much.