Hi!
I'm enjoying your Automagic app, and I especially love the "alternative" airplane mode, which is the reason why I switched from Tasker
Now, the questions : can you have a "notification count" variable or something like that? I'm trying to make a flow to turn on the notification led if there are active notifications in the taskbar, but I can't find a way of keeping track of them. I can set some variable when they show up, but then how do I know if they've been cleaned or not?
Thanks!
Notification count
Moderator: Martin
Re: Notification count
Hi,
Thanks
The next version of Automagic will introduce a new trigger to execute a flow when a statusbar notification is cleared/removed (Android 4.3+ only). There will also be a new condition to check if notifications are currently displayed on the statusbar (also Android 4.3+ only) which should make it possible to create the flow you are looking for.
Regards,
Martin
Thanks
The next version of Automagic will introduce a new trigger to execute a flow when a statusbar notification is cleared/removed (Android 4.3+ only). There will also be a new condition to check if notifications are currently displayed on the statusbar (also Android 4.3+ only) which should make it possible to create the flow you are looking for.
Regards,
Martin
Re: Notification count
Awesome! Thanks, looking forward to the next version
Re: Notification count
Hi Martin,
I'm switching from 4.4 custom ROM to 4.2 stock ROM because I'm fed up with stability issues, and now I'm facing a problem with a flow that is dealing with notifications (namely a "periodic reminder").
Under 4.4, you have introduce a couple of triggers to detect notification being displayed and removed.
It works great but only under 4.4.
Under 4.2 I have no way to detect that a certain notification has been removed from statusbar, and thus I have to use "User Present" trigger to stop my reminder, and that is not a good way to do that.
My point is : I don't understand the "4.4 mandatory" limitation, because there is hundreds of APK that use android accessibility service to detect notification arrival and dismissal ...
Could you explain to me why those triggers cannot be somehow back-ported to 4.2 and even older platforms ?
Tks
I'm switching from 4.4 custom ROM to 4.2 stock ROM because I'm fed up with stability issues, and now I'm facing a problem with a flow that is dealing with notifications (namely a "periodic reminder").
Under 4.4, you have introduce a couple of triggers to detect notification being displayed and removed.
It works great but only under 4.4.
Under 4.2 I have no way to detect that a certain notification has been removed from statusbar, and thus I have to use "User Present" trigger to stop my reminder, and that is not a good way to do that.
My point is : I don't understand the "4.4 mandatory" limitation, because there is hundreds of APK that use android accessibility service to detect notification arrival and dismissal ...
Could you explain to me why those triggers cannot be somehow back-ported to 4.2 and even older platforms ?
Tks
Re: Notification count
Hi Vilo,
To my knowledge Android only sends an accessibility event when a new notification is posted but not when one is removed. Maybe there are some hacks to detect when a notification is clicked and thus removed but I think the system does not send anything when a notification is removed by an app from the background.
The next version of Automagic introduces a new trigger UI Event to execute flows on more accessibility events so you might be able to build a workaround with the next version iff the system sends an event.
Maybe you could also Execute Root Command: dumpsys notification and check whether the output contains the notification you are looking for.
The triggers you have used depend on the new notification listener feature that was introduced with Android 4.3 so the new notification triggers and conditions should also work with Android 4.3.
Regards,
Martin
To my knowledge Android only sends an accessibility event when a new notification is posted but not when one is removed. Maybe there are some hacks to detect when a notification is clicked and thus removed but I think the system does not send anything when a notification is removed by an app from the background.
The next version of Automagic introduces a new trigger UI Event to execute flows on more accessibility events so you might be able to build a workaround with the next version iff the system sends an event.
Maybe you could also Execute Root Command: dumpsys notification and check whether the output contains the notification you are looking for.
The triggers you have used depend on the new notification listener feature that was introduced with Android 4.3 so the new notification triggers and conditions should also work with Android 4.3.
Regards,
Martin
Re: Notification count
Thanks Martin for your answer.
The obvious workaround, indeed, would be to monitor Statusbar with your command "Execute Root Command: dumpsys notification", but I had preferred doing this in a synchronous manner.
The only solution I found that is reliable is to generate a notification with an ID when reminder starts, and stop the reminder when it is clicked.
By the way this is not a very bad thing, since KK update is about to arrive on my phone.
Keep going with this wonderful tool
The obvious workaround, indeed, would be to monitor Statusbar with your command "Execute Root Command: dumpsys notification", but I had preferred doing this in a synchronous manner.
The only solution I found that is reliable is to generate a notification with an ID when reminder starts, and stop the reminder when it is clicked.
By the way this is not a very bad thing, since KK update is about to arrive on my phone.
Keep going with this wonderful tool