• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Statusbar icon custom variable

last1left91

Lurker
Hi there,
I've been struggling on this problem for about 2 days and I couldn't come up with a solution yet!
Well, I made a scene that allows me to change the display_timeout dinamically but now I want that value(stored in a variable %new_val or any other variable) to be displayed in the statusbar and stay there forever...is that possible with Tasker.
I was so close when I heard about AutoNotification which does what I want to achieve but It doesn't allow me to display custom icons and variables on the statusbar! It just allows me to add some predefined icons but nothing about variables...maybe you guys know a solution to solve this problem!
Let's say I've just changed my Display Timeout from default value: 15 seconds to 47 seconds...Well, that appears into my Display Settings but I want that value : 47 to appear in the statusbar as there are already: Swapps, GMD Gesture Control icons...do you get my idea? Thanks in advance!!
 
As an example ... how about ...

aaaa
A1: Variable Set [ Name:%aaaa To:message Do Maths:Off Append:Off ]
A2: Notify [ Title:%aaaa Text: Icon:hd_ab_av_play Number:0 Permanent:Off Priority:3 ]
A3: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A4: Notify Cancel [ Title: Warn Not Exist:Off ]
A5: Variable Set [ Name:%aaaa To:another Do Maths:Off Append:Off ]
A6: Notify [ Title:%aaaa Text: Icon:hd_ab_av_play Number:0 Permanent:Off Priority:3 ]

... Thom
 
Last edited:
As an example ... how about ...

aaaa
A1: Variable Set [ Name:%aaaa To:message Do Maths:Off Append:Off ]
A2: Notify [ Title:%aaaa Text: Icon:hd_ab_av_play Number:0 Permanent:Off Priority:3 ]
A3: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A4: Notify Cancel [ Title: Warn Not Exist:Off ]
A5: Variable Set [ Name:%aaaa To:another Do Maths:Off Append:Off ]
A6: Notify [ Title:%aaaa Text: Icon:hd_ab_av_play Number:0 Permanent:Off Priority:3 ]

... Thom
Well, your idea is not bad at all but the message stays in the Notification Panel while I want my message to appear in the statusbar and stay there. All I can get in the statusbar is the triangle icon which btw it took me some to figure out how to display:D!
This is how I've implemented it:

Variable set [%flags to %DTOUT(current display timeout)]
Notify[ Title: %flags]
Wait:5 seconds
Notify Cancel
Variable Set[%flags to %DTOUT]
Notify[Title: %flags]
As a result I get icon 60 but just as a flash, then on the statusbar remains only the icon(triangle) and I wanted that value: 60 to be displayed in the statusbar...
Instead, I get that "60" value in the notification bar which by the way is not persistent :)...If I clear all my notification, that 60 notification also dissapears!
Maybe if I can get that "60" notification persistent it might be a real solution...I'm not that lazy so I cannot drag the statusbar and find out what my current Display Timeout level is but usually I clear all my notifications and everything that is not persistent, dissapears.In this case the same will happen to my notification :(
Thanks anyway! :)
 
The basic capability on an un-root-ed phone only seems to support an icon.

... Thom
My phone is rooted! Is there any way so I can place a variable text instead of an icon?...I mean...that icon would be static and I want to display something dinamic...maybe with autonotification? :) Have someone else tried this?:)
 
The month days ipack provides icons which are numbers 1-31 in various colors. You can't go directly from a variable to an icon, but you can do it using nested if statements (if your variable is an integer 1-31)

http://ipack.dinglisch.net/gallery/MonthDays/index.html

I use it on my status bar as indicator of my tasker-controlled volume setting:
1= notifications silenced
2= notifications and ringtone silenced
3= notifications, ringtone, media silenced
4= notifications, ringtone, media and alarm silenced
 
Good. Try starting at ... http://ipack.dinglisch.net/index.html.

... and this to display today's date ...

aaaa
A1: Notify [ Title:m Text:month Icon:ipack:monthdaysshd:white_06 Number:2 Permanent:Off Priority:4 ]
A2: Notify [ Title:d Text:day Icon:ipack:monthdaysshd:white_21 Number:1 Permanent:Off Priority:3 ]
A3: Notify [ Title:y Text:year Icon:ipack:monthdaysshd:white_15 Number:1 Permanent:Off Priority:2 ]

... Thom
 
Last edited:
The month days ipack provides icons which are numbers 1-31 in various colors. You can't go directly from a variable to an icon, but you can do it using nested if statements (if your variable is an integer 1-31)

http://ipack.dinglisch.net/gallery/MonthDays/index.html

I use it on my status bar as indicator of my tasker-controlled volume setting:
1= notifications silenced
2= notifications and ringtone silenced
3= notifications, ringtone, media silenced
4= notifications, ringtone, media and alarm silenced
Well, that's the best idea. Works like charm but I can get icons only in the interval 1-31:(...I would like something between 10-60 seconds...might it be any workarounds to extend that icon pack to the interval I need?:D
 
Use two instead of one (I showed the date in three)

... Thom
I don't know why but I can't get it to work. I've tried like this:
Use two instead of one (I showed the date in three)

... Thom
Well, your idea is not quite good...I mean...if I set my Display Timeout at 57 seconds, for example...it will look something like 5 7...this is how your date look like : 6 29 15 and it does't look very well..
Anyway, I decompiled MonthDays, I added 29 extra icons, recompiled, signed the apk and it works well now...the only thing is the icons I've created, lost their transparency :(
Maybe you know some app than can get transparency back :)...I've edited them in Paint :D
I have a big problem though.
I have another profile that uses an alert/notification action When I'm connected to WiFi it shows me a suggestive icon and when I'm no longer connected it also displays me the same icon but faded in the statusbar!
As you already know, my task contains a Notify Cancel action in order to delete the last set notification as in the example:

A1: Variable Set [ Name:%aaaa To:message Do Maths:Off Append:Off ]
A2: Notify [ Title:%aaaa Text: Icon:hd_ab_av_play Number:0 Permanent:Off Priority:3 ]
A3: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A4: Notify Cancel [ Title: Warn Not Exist:Off ]
A5: Variable Set [ Name:%aaaa To:another Do Maths:Off Append:Off ]
A6: Notify [ Title:%aaaa Text: Icon:hd_ab_av_play Number:0 Permanent:Off Priority:3 ]

If I delete "Notify Cancel" action, it will display all the notifications one by one so I must keep it active.
But, when the second profile is triggered which means, when I'm connected to WiFi it will cancel the last notification which is not only the old state("Wifi not connected") but also my display Timeout icon...so it will delete my Timeout Icon.
If I delete action A4, it will keep my Timeout Icon untouched but it will also keep my faded icon( Not Wifi Connected) and I don't want it that way.
I want to do some way and keep these both notifications triggered by different profiles but also being able to switch between WiFi Connected/WiFi Disconnected Statusbar Icon respectively Display Timeout Statusbar Icon.
Those fields: Number and Priority...what's they role? :)...cheers!!
 
Back
Top Bottom