KLWP: issue on alternative show of wifi/gsm data usage

HI guys.

I’m a long time user of KLWP. Created a wallpaper a long ago, however one function does not work since some time. I used it on my Note 10+ and since a few days I use my theme on S23 Ultra. BTW, “deactivate parallel rendering” is on and helped by the refresh rate differences between my NovaLauncher and KLWP.

To the point:
as a part of my wallpaper I have a short function, that should:
a. when wifi turned off, it should show my GSM provider, whos data transmission is used
b. when wifi on, it shuld show me the SSID of the wifi network
(those 2 point should be showed interchangeable in one line, depending on the data transmission mode used)
c. by that switch the icon, before the text, should change to show what type of data transmission is used, but it does not change anymore :frowning:

It all does not work that way, so I the only option was to put it so that:
a. it shows wifi is “ENABLED” or “DISABLED”
b. behind it showes the mobile data stream available

with the following command:
[c=#FFFFFF00]$nc(wifi)$[/c], $nc(carrier, 0)$ i[/i]$

Google Photos

How to get it work properly, i.e. interchangeable wifi ssid or gsm provider ?
Please help. I would very much appreciate your help, guys.

Can you provide the original formula that you use that worked?

Hi Ace.

The original formula, quite old, but working in my previous
Samsung’s Note 8 and later until some update
on my Note 10+ was:
$if(nc(wifi)=connected,gv(Net-wifi),gv(Net-gsm))$

I tried to exchange the parts “Net-wifi” and “Net-gsm” parts
into the new ones, but failed with that :frowning:

Would wery much appreciate the change into new formulas :slight_smile:

The following works on my Samsung A54:

$if(nc(wifi)=CONNECTED,nc(ssid),nc(operator, nc(sdata)))$

Hi there, Nihilism.

Thanks a lot for the try.
On my S23 Ultra (OneUI 6.0)
it just shows the mobile operator, doesn’t matter if WiFi is turned on or off. :confused:

This seems to work for me as well. Can you check if the output of $nc(wifi)$ changes as you turn on/off your wifi?

It does change to “ENABLED” when WiFi is on
and “DISABLED” when WiFi is off.

When I use $nc(ssid)$ instead of $nc(wifi)$,
it does’nt show the WiFi network name, but noSSID :frowning:
but that was what I have jad before and wanted now to see with what network
the phone would be connected.

BTW, I’m on OneUI 6.1 since today, but that did not do anything to the function.

$nc(ssid)$ will show the name of the wifi network you’re connected to. If you’re only getting ENABLED and DISABLED, that means that KLWP is not detecting you to be connected to a wifi network. Please make sure that you are currently connected to a wifi network and not simply have the wifi enabled. See if you’ll get a CONNECTED output for $nc(wifi)$.

OMG, I found where the problem is !
The function
$if(nc(wifi)=CONNECTED,nc(ssid),nc(operator, nc(sdata)))$
works, as I want, i.e. shows interchangeable my WiFi network name or GSM provider name, BUT ONLY when my location is turned on !!!
Earlier that was not necessary to work and now I actually do not want to turn on the GPS antenna.
Question is then how to overcome that now.

1 Like

Location permission has been a requirement for network data access since a few Android versions back. This is actually an Android change and there’s no way around this.

HI there Ace,

Thanks a lot for all your help.
I will have to live with location turned on on my mobile if I want the notification
to be working like that.

Anyway, problem is just PARTLY solved.
Using that function:

$if(nc(wifi)=CONNECTED,nc(ssid),nc(carrier, nc(sdata)))$

… when WiFi (=ssid) turned off and I switch into GSM data transmission, it shows the carrier/operator name, BUT NOT the type of data transmission type, like 3G, 4G or 5G :confused:
Any ideas on how to update the formula, guys ? I

$if(nc(wifi)=CONNECTED,nc(ssid),nc(operator, nc(sdata))+" "+nc(dtypes))$

should work for you.

Hi Nihilism,
Thanks a lot for your hint.

I modified sloghtly your formula like below showed and it works better now:

$if(nc(wifi)=CONNECTED,nc(ssid),nc(carrier, nc(sdata))+" > "+nc(dtypes))$

I will have to check in a place without 4G mobile connection if it changes into other mode.
I’ll let you know the final.

Have a great day, guys.

CARRIER and OPERATOR should normally give you the same result, unless you have two SIMs in which case CARRIER will always show you the first SIM but OPERATOR should show you the active SIM. Also with OPERATOR you can specify which SIM (nc(operator,1) will give you the second SIM). At least that’s it to the best of my knowledge.