yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] rebecker:
Force 24 hour format

I currently use a 12 hour format for time. However, I would like to design a weather widget that depends on both time and sun. I posted my current layout above. It works ok, but I'd like to be a bit more accurate. If I could use a 24 hour clock, I believe I could create a more accurate widget. Is there a way to force a 24 hour format? Here's an example, where "hhmm24" would represent the 24 hour format:

$if(df(hhmm24)<df("hhmm24",ai(sunrise)),wf(max,0),"")$

Thanks.

An addendum: This seems to work well, if anyone is interested.

$if (ai(isday)=0,wf(min, 0),wf(max, 0))$$if (ai(isday)=0,"","/")$$if (ai(isday)=0,"",wf(min, 0))$$if(tf(ai(nsunrise),M)>(tf(0h0m0sa1d,M)),"","/")$$if(tf(ai(nsunrise),M)>(tf(0h0m0sa1d,M)),"",wf(max,0))$
[Android Apps and Games] frankmonza:
$df(HH)$ gives time in 24 hours, always, but you should NOT do comparison that way you should do $if(df(S)< df(S, ai(sunrise)), wf(max,0), "")$, this is better, also your "long" formula could just be

$if(ai(isday)=0, wf(min, 0), wf(max, 0) + "/" + wf(min,0))$$if(df(D) != df(D, ai(nsunrise),"","/" + wf(max, 0))$
[Android Apps and Games] rebecker:
One additional question... I can't seem to get the icons to only show daytime style. I have Nightico off, but the night icon still shows. Is there a fix?
[Android Apps and Games] frankmonza:
Mmm, on the default iconset?
[Android Apps and Games] rebecker:
Yes, with the default set and all others. I can't seem to turn the night icons off.
[Android Apps and Games] rebecker:
I tried using your shorter formula. It doesn't return all the same results as my "long" version.

My Long version:

Sunrise to sunset: Forecast Max/Min (78/54)

Sunset to midnight: Forecast Min (54)

Midnight to sunrise: Forecast Min/Max (54/82)

Your Short version:

Sunrise to sunset: Forecast Max/Min (78/54)

Sunset to midnight: Forecast Min (54)

Midnight to sunrise: Forecast Min (54)

Since I don't really understand your version, any chance you can add the "Max" for midnight to sunrise for me?

Thanks again for a wonderful app.
[Android Apps and Games] frankmonza:
Then just do this

$if(ai(isday)=0 & df(S) > df(S, ai(sunrise)), wf(min, 0), wf(max, 0) + "/" + wf(min,0))$

Which means "if its night and current time is AFTER sunrise then show only min otherwise max and min"

df(S) will return seconds from epoch now, df(S, ai(sunrise)) will return seconds for the sunrise of today, which will be in the future after midnight in the past before
[Android Apps and Games] rebecker:
Thank you! I'll try it. And thanks for the explanation. I think I understand it. ;)

Have you had a chance to look at the Nightico settings? I still haven't figured out a way to prevent the night icons from showing.

Thanks again.
[Android Apps and Games] Radagast13:
How can I do something similar for wifi traffic? I can't find a formula/function that gives wifi traffic data.
[Android Apps and Games] frankmonza:
You can get wifi traffic by removing mobile from total
[Android Apps and Games] Mr_Happy:
Was looking for that also, but I'm unable to find how to do that...

Verstuurd vanaf mijn ONEPLUS A3003 met Tapatalk
[Android Apps and Games] Radagast13:
Thanks! I finally figured out how to get total traffic [ts(tt, ...)], so I tried the following for the wi-fi display [when gv(worm)=w]:

$if(gv(worm)=w,"Wi-Fi: "+ts(tt, a, r0d)-ts(mt, a, r0d))$

But it displays:

Wi-Fi: 18.32mb-17.59mb

How do I get it to perform the subtraction? [Sorry, I'm a newbie :)]
[Android Apps and Games] rebecker:
frankmonza.

I think I have the temp settings working exactly the way I want.

$if(ai(isday)=0,wf(min, 0),wf(max, 0)+"/"+wf(min, 0))$$if(tf(ai(nsunrise),S)>(tf(0h0m0sa1d,S)),"","/"+wf(max,0))$

This formula returns the following:

Sunrise til sunset: max/min 75/50

Sunset til midnight: min 50

Midnight til sunrise: min/max 50/78

My only question is whether the last half of the formula is the most efficient: $if(tf(ai(nsunrise),S)>(tf(0h0m0sa1d,S)),"","/"+wf(max,0))$

It works, but I want it perfect. ;)

Thanks.
[Android Apps and Games] coccco28:
Frank i have an question:kwgt makes the widget bigger or smaller on size when you export them deppending of the screen resolution?

---------- Post added at 12:49 PM ---------- Previous post was at 12:26 PM ----------

Here if someone can explain i have an s8+ and on the first screenshot there are just a few elements added on an overlap group now how can this elements after i export the widget make it 304kb in size?to me that is to much and kwgt should deal bether with the size but the strange part comes when i add an bg picture frame that the image have only 99 kb now after i fit all in and export it i get 2,2 mb how can even that be possible?
[Android Apps and Games] coccco28:
Hey frank you have nothing to reply to my post about those sizes?
[Android Apps and Games] partcyborg:
You think 304kb is large? For a GUI wysiwyg generated widget with vector graphic rendering? In Java? On a phone with gigabytes of memory?
[Android Apps and Games] coccco28:
It is not about 304kb is just that i add kwgt and klwp on my themes and i can't add to many if an kwgt have more then 2mb. when i add an image that have 99kb and export it and will give me 2mb in size this is my problem here how can you explain that on my examples lets say all those elements have 304kb + the image 99kb total should have 403kb not 2mb
[Android Apps and Games] partcyborg:
Lol have you ever written a Java app? It's not exactly optimized for size I'm sure there's all kinds of framework and library crap around svg and scalable whatever that causes it. Don't go expecting the developer to take apart compiled code and documenting it for you. Maybe if you can find and prove an inefficiency in what the app generated the dev will fix it for you.
[Android Apps and Games] coccco28:
I don't need an documentation i just need to know why the difference is so big i am not an expert for that i ask him as because in my opinion an simple kwgt with a few elements added shouldn't take so much space and from what i see the space is affected by the layout of the icons also and the screen of the phone to.
[Android Apps and Games] frankmonza:
Not sure i understand, the problem is that you add 300K templates and the app generated is 2MB? Are you using APK maker? If yes thats the best you can get since its already quite optimized, doesnt use a lot of libraries but some stuff needs to be there. An APK is a zip file you can open and look how space is used. If you want to dig deeper then do the following:

Build your skin apk using Android Studio and following the tutorial at the main Bitbucket Repo https://bitbucket.org/frankmonza/kustomskinsample

Use Android Studio 3.0 BETA

Use APK analyzer inside Android Studio https://developer.android.com/studio/build/apk-analyzer.html

This will give you a super detailed info on who is using what, i suspect most of those 2 megs are the Android Support library to show list views and toolbar stuff.
[Android Apps and Games] coccco28:
no bro.ok let me explain i was remake an old kwgt that have simple things as shows on those screens i post above, now all those elements with an bitmap has 300k cool lets say but i add an bitmap that have 99kb size till here all ok now here comes the problem when i export all those elements with the bitmap in it makes the kwgt more then 2 mb in size and this as .kwgt not as .apk because i add them into my themes and this in my opinion something on export part is not handle very well just because i can't explain what kwgt add more that takes more then 1mb in size.i am telling you all this because my themes support only kwgt and klwp and i will like to can add a few more widgets into my themes so ppl can enjoy them but with how kwgt esport them i can add just a few as i need space for adding more icons and google limit themes to just 100mb max size.
[Android Apps and Games] Anªk|n:
Hi,

I've KWGT installed on LineageOS 14.1 and xposed. I put a widget on my lockscreen and everything seemed working fine, but the clock never updates, staying stuck on the time and date I inserted the widget.

I looked around to find a solution and it seems I may have to whitelist KWGT to run as service or the like, but not sure if I need to do it on LOS nor where to do it. Any suggestions?
[Android Apps and Games] frankmonza:
If KWGT doesnt update (every minute) then the service is gone, depending on the stuff you have installed it might be required to whitelist it from some app, like purify, greenify or OS specific tools
[Android Apps and Games] Anªk|n:
I'm currently trying to figure it out. I found Privacy Guard can interfere, but looking into the specific KWGT configuration, background permissions are on and have been granted 3000+ times, currently going up.
[Android Apps and Games] Icetea:
How can i use variables from macrodroid in KWGT?

i want to use a KWGT widget witch shows a macrodroid variable text in it.

Macrodroid is able to handle intents butunfortunately i don’t know the way to use.

solved!
[Android Apps and Games] rebecker:
Is there a way to have a widget appear only between the hours of 10:00pm and 5:00am? I've got a clock widget I'd like to see if I turn on the phone in the middle of the night. Thanks.

Never mind. I think I've got it.

$if(df(HH)<15 | df(HH)>20,#DB000000,#00FFFFFF)$

Any suggestions to improve appreciated.
[Android Apps and Games] Anªk|n:
Ok, I found what it was! It was ALL my fault. I'm a bit ashamed, but in the xposed lock screen widgets exists an option that specifically enables/disables the widget update and for some reason the first time I configured it I checked it :crying:
[Android Apps and Games] frankmonza:
No worries, good to know, thanks for posting maybe will help someone if they do the same :)
[Android Apps and Games] Icetea:
Question:

How can i show variables from MacroDroid in a KWGT Widget?

Answer:

MacroDroid can use Locale/Tasker plugins! So you can use the Tasker KWGT plugin for it.

At the first row of this plugin, you can define the tasker variable. This input can also be a macrodroid variable!!!

Then you have to use "[v=name of var]" declaration to define the MD var. In the second row you can use the name of the transfer variable you like to use. In KWGT you must use the broadcast string "$br(tasker,name of transfer var}$" (without " "!). So if you name it to INFO, it will be "$br(tasker,INFO)$" in KWGT.
[Android Apps and Games] stunned:
Has someone made a google clock widget look-a-like?
[Android Apps and Games] Icetea:
[MENTION=3491794]stunned[/MENTION]

it was easy to create it, but it seems not easy to integrate second pointer into it because the widget does not refresh every second. Anyway, here is my first result without second pointer.
[Android Apps and Games] rebecker:
I believe that the second hand function causes excessive battery drain.
[Android Apps and Games] Icetea:
hour and minute hand function are buil in in kwgt. Second hand not! If you try to animate it with a formula, the widget doesn’t refresh every second. I tried $(seq,1/60,1,60)$ and it worked until i am in KWGT. Butt after saving the widget, the refresh is not continuously.

Maybe someone else will have a other suggestion.
[Android Apps and Games] Thoadi:
Why weather icons all night mode, I have this only for the current day enabled...

If I open it with KWGT, It's loading correct for 1 sec and switch all icons to Night mode :rolleyes:
[Android Apps and Games] edukardo:
Yep. Same here...
[Android Apps and Games] Icetea:
did you tried this beta too ? = -> https://rink.hockeyapp.net/apps/61f28257f7835389291887d09a6f4086
[Android Apps and Games] Icetea:
[MENTION=6044166]frankmonza[/MENTION]

there are many triggers in the NC area of KWGT, but no trigger for working NFC!

I want to create a indicator widget for showing all working connections.

Airplane; BT; WLan; Data; Sync; GPS pos; are already working, but i can not detect NFC until now! NFC is the one way to connect to my device without

KWGT support.

Hope, YOU will support my request. ;)

BTW: don’t suggest to use Google+ or Custom side for it. I got your reply mail but don’t want to login for it. pardon me!

Edit: Widget screen shot updated to last version

until now, NFC indicator is poorly not working. But hope dies at last!:fingers-crossed:
[Android Apps and Games] Bcl2:
Hi guys, I've just installed the pro version of KWGT and I'm still learning to use it. I made a simple widget that shows the battery level of the Motorola batttery mod on the Moto Z2 play. What do I do to share this widget with the community? Do I have to use the ''APK maker''?
[Android Apps and Games] Mich2Ga:
Very nice widget...
[Android Apps and Games] Icetea:
some other of my widgets: included informations -> clock; mem; signal; sot; wlan satus &ssid; volume level :D

KWGT is realy very powerfull! I love it!!! I like to use it together with macrodroid.
[Android Apps and Games] R3van:
How can i change the language of wi output?

I try to use Weather Underground as weather provider but it gives me the forecast only in english.

They hav an option to get forecast in local languages but where can i put this in kwgt?

https://www.wunderground.com/weather/api/d/docs?d=language-support&MR=1
[Android Apps and Games] george_o:
I managed to get current weather condition from WU in romanian language with "Text > Wget > $wg("api.wunderground.com/api/your_api_key/conditions/lang:RO/q/Romania/Bucharest.xml", xml, "//weather")$,

but there are some problems with romanian diacritics, meaning that they are not displayed. Instead of "Zăpadă" appears "Zpad"
[Android Apps and Games] FadeFx:
I am having a strange issue, i try to display the provider name of mobile connection while no wifi connection is active using this

$if(nc(ssid)=MyWIFISSID,"Netz: "+nc (operator),nc(ssid))$

which works well in the preview, but it for some strange reason does not display anything on my widget. Any idea what is wrong there?

Gesendet von meinem ZTE A2017G mit Tapatalk

Edit: solved it by putting some extra ()

$if(nc(ssid)=MyWIFISSID,("Netz: "+nc (operator)),(nc(ssid)))$
[Android Apps and Games] protegeone:
Hi everyone !

I've just moved from Zooper to KWGT, so I'm trying to recreate my old widget, whereas I bumped into this error:

Successfully recreated my main widget, where battery bar is an arc ( see posted screentshot ) with a tutorial found.

All seemed fine, however even at 100% full battery the arc is not fully filled with colour.

I've also attached the colour fill formula I've used.

I'd appreciate any insight.
[Android Apps and Games] nightfever:
Hi,

the following part of a widget that I created does show up correctly in the preview but not in the wigdet itself:

$if(nc(ssid)=MyWIFISSID,nc(dtype)+" "+nc(operator),nc(ssid))$

When I am connected with a wifi, it shows SSID correctly in prewiew and in widget. But when I am not connected to any wifi, dtype and operator shows up correctly in the preview but not in the widget.

What's the problem?

Other question: How can I change the fonticon depending on if i am connected to wifi or mobile data.
[Android Apps and Games] M1chiel:
Not sure why it doesn't work. This one comes from one of the Huk widgets and works for me:

$if(nc(wifi) != CONNECTED, nc(dtypes))$$nc(ssid)$
[Android Apps and Games] nightfever:
That's working, thanks.
[Android Apps and Games] fabiospark:
How to create a sort of a shortcut in Nova, to launch an app

I installed Perfecly Clear but in Nova launcher widgets list I don't see

one for that app so I can't launch it from the Home page.

Is there a way to create a simple object that can be placed on the home screen

of Nova and that when touched it will launch the app directly?

If the answer is yes, would you be so kind to point me to a tut or an explanation

on how to do it? I never use KWGT before.

Thanks
[Android Apps and Games] JazzMozz:
Unknown SSID

I have a string that produces (or ought to produce) the name of the SSID that my device is connected to. Whenever in the WYSIWYG editor, this produces the correct result (I can see the name of my wifi network at home). But whenever I look at the widget on my home screen, it says "unknown SSID". What gives?

I'm running Android 8.1
[Android Apps and Games] pantale:
I noticed a problem with text display. There is an option to define the max number of lines to display but it doesn't work anymore since I installed Oreo. No matter what value I put I always have the full number of lines displayed.

Had to truncate my text to fit in my box.
[Android Apps and Games] pantale:
Here is a screenshot of my text problem.

The selected text must be truncated to one line but two are currently displayed.
[Android Apps and Games] Alexandremax:
Power Battery

Hello!!!

Can you help me to do a formula that do this =>Example: Your Battery is at 44% and it will be discharged 6 Hours from now
[Android Apps and Games] _WiNNa_:
That's something you could do with just clicking on the provided samples:

Your battery is at $bi(level)$% and will be $if(bi(charging) = 0, discharged, charged)$ $tf(bi(fullempty))$
[Android Apps and Games] Alexandremax:
Thanks !!!!! :):):):):)
[Android Apps and Games] Xixmx:
Appreciate any feedback on battery usage of the widget, thanks.
[Android Apps and Games] siealex:
Switch on geolocation on your device.
[Android Apps and Games] carlosmax:
Music Player Like this

Hello!!!

How can i make a music player simple like this?

I Will Never be the Same (song title)

o------------------ (song progress bar)

Tornadoes (artist)

<< |> >> (controls)
[Android Apps and Games] carlosmax:
Any Help? Any Help?

Any Help? Any Help?
[Android Apps and Games] Thoadi:
I think you could just control a player app, don't know which ones...

Did you search the net for KWGT music? you will find plenty of information, tutorials videos and maybe even an example to download. Then take what you need from this.
[Android Apps and Games] JMC1961:
<unknown SSID>

Hello,

:(

I have exactly the same situation... And I moved from Zooper (which I used since the begining !!) to KWGT because of the same issue... so I guess it is related to android version (Oreo 8.1)... This was not hapening with 8.0 and with previous Android versions...

By the way my phone is a Oneplus 5 running OOS xXx Oreo 8.1
[Android Apps and Games] stchoh:
Whos can provide code to me.

for pro version..
[Android Apps and Games] partcyborg:
Play store can, just support the devs who work hard to make this software for us by spending a few measly dollars on their amazing app.
[Android Apps and Games] djsubtronic:
Hello, I have made a 4x1 clock widget which has worked fine since I created it and looks like this:

It's on a Galaxy S9 using Nova Launcher Prime, and ever since I used the power saver option of the phone (which changed the resolution), the widget sizes have kept changing. It can be fixed by resizing the widget, making it smaller, then restoring it to its original size, and the contents are back to the correct size. But after a while the widget contents will change size by themselves again. Ends up looking like this:

This is annoying as it keeps happening, the resolution has not been changed since I did the power saver thing, and I have deleted/readded the widgets from their last saved correct versions. I've also tried both settings in KWGT widget sizing options (resize/fixed) but no luck.
[Android Apps and Games] Sir Backe:
Hi guys

Long way behind me. From UCCW years ago, I came over Zooper to this wonderful app. Try to remake my widgets now with this app. So still learning. My first question:

In one of my widgets I used Miui Flex wonderful weather icons as background Icons of my widget. It always should me the actual weather outside, changing itself based on the weather forecast. Can anyone tell me how I can use an own icon collection in KWGT?

Thanks in advance!
[Android Apps and Games] TG111:
Nice :)
[Android Apps and Games] maghohtc:
Good evening everyone I would need help, I created a widget for notifications but sometimes it happens that are longer than the widget and then I can not read the content, you know if there is a formula to scroll the text, maybe clicking on it? Sorry English incorrect but I use the translator, and thanks in advance for the help
[Android Apps and Games] Trekstaaf:
Hi All,

I have created a notification wiget that shows all notifications in a stacked kind of way. Pressing the widget on the left opens the notification and pressing it on the right dismisses the notification. That works.

What i would like is that when the notification count is 0 (so when the notification center is empty and not showing a notification) that it shows a stacked layer or a overlap layer.

How do i hide the stacked or overlap layer when the notification count is 1 or higher.

I cannot get this to work as the layer still shows what is in it ontop of my notifications.

Woud anybody be able to help me out by perhaps sharing a formule ? or point me in the correct direction.

regards Schele
[Android Apps and Games] siealex:
Can I do this with KWGT?

1. Obtain the current date, time and timezone.

2. Obtain the sunrise time (maybe also sunset and/or astronomical noon and midnight). Also GPS coordinates, if available.

3. Calculate several (5 to 10) numerical variables using these data and trigonometric functions (without displaying!).

4. Calculate three more values using all these variables and display them as time on the widget.

Is it possible to store values and update them without displaying?
[Android Apps and Games] carlosmax:
Hi!!!

How i use the Swash Characters ?
[Android Apps and Games] -Zeppelin-:
Do we have an official widget showoff thread for kwgt here at XDA?

Gesendet von meinem Pixel 3 XL mit Tapatalk
[Android Apps and Games] teukka79:
is it possible do correct mirror image?

---------- Post added at 10:46 PM ---------- Previous post was at 10:39 PM ----------

Nevermind. I figured it out.

Rotation --> 3D Flip X

Offset --> 180
[Android Apps and Games] =dgim=:
Hello, I want to change the colour of the value (percent of the moon) depeding on the value.

For example, IF percent of the moon is >=90, I want to see value as number (92 etc) in red colour, otherwise in black colour.

I put that kind of formule:

$if(ai(mill)>=90,#FFFF0000,#FF000000)$%

or

$if(ai(mill)>=90,gv(Red),gv(Black)$%

That formules generate values: #FFFF0000 or #FF000000 instead the value as number.

Is it possible to generates it as numbers in properly colour ?

---

Ok, I corrected formule and now it works as I wanted:

[c=$if(ai(mill)>=90,gv(Red),gv(Black))$]$ai(mill)$%[/c]
[Android Apps and Games] Mbadr3:
Hello, I'm trying to make quick settings but the only problem I've is the data detection by KWGT. The global variable "data" has 3 options "on,off and both" I've 3 shapes for the data button named as "on,off and both". Their visibility codes are like this: On shape: $if(gv(data)=on, always, remove) $ Off shape: $if(gv(data)=off, always, remove) $ Both shape: $if(gv(data)=both, always, remove) $ However the global variable data is always wrong detecting cell state. It has this formula: $if(nc(wifi)=on & nc(cell)=data ,both)$ $if(nc(ifname)=rmnet0 ,on)$ $if (nc(cell)=off | nc(cell)=disconnected ,off )$ Both and Off never work.

I tried with tasker to switch manually also xposed edge pro to send KWGT action but they're too slow while they're both working.

I noticed that the current cellular status detected as On always it must be a bug.
[Android Apps and Games] quack3d:
I tried installing KWGT and created 2 identical widgets as I have in Zooper. After a day or so KWGT shows up with 0,5 % battery life used but still no sign of Zooper in that list. I thought KWGT was supposed to be more battery efficient? All the widgets are doing is displaying tasker variables that are updated about once an hour.
[Android Apps and Games] sthuv:
Hello,

The weather condition is not translate in my language (french) with yahoo, is there a way to get a translated condition. No issue with an another provider.

Thanks
[Android Apps and Games] NumairAdil:
Hi, you have to make your own weather icon komponent, for assistance click the link below

https://help.kustom.rocks/i189-weather-icon-komponent-creation-image-or-svg