AutoNotification button click issue

481 views
Skip to first unread message

RegiOween

unread,
May 15, 2020, 2:04:26 PM5/15/20
to Tasker
Hello folks!

I'm new here, so I registered just to ask this specific question:

I'm desperately trying to figure out how to programmatically click the "Mute" button on the little app "TrayVolume lite", which I use to easily control media volume.

What I tried so far:

----------
Task "Mute"

A1. AutoNotification Query
    Notification Apps: TrayVolume lite
    Persistency Type: Both
    Gel All Fields: true
A2. Flash %anbutton4action(1)
A3. AutoNofitication Action
    Notification Apps: TrayVolume lite
    Intercept Action ID: %anbutton4action(1)
A4. Flash %anactionid
----------

The first toast shows %anbutton4action1 (the Intercept Action ID should be displayed)
The second toast shows %anactionid (meaning no action was performed)

None of the variables related to buttons return any valid info at all, so I'm stuck with this problem, unable to know if I'm doing something wrong, of if there's some bug around.

My setup:

Motorola Moto X Play
Android 7.1.1 (Rooted)
Tasker 5.9.2
AutoNotification 4.1.4
AutoInput 2.8.1

Tasker, AutoNotification and AutoInput have Accessibility permissions allowed and Nofitication access allowed, and I'm using Tasker and AutoInput without any problems so far.
If you need any more info, please ask.

Thanks in advance!

RegiOween

Rich D

unread,
May 15, 2020, 3:38:10 PM5/15/20
to Tasker Google Groups Post
Use -
%aninternalactions(4)

Instead of -
%anbutton4action(1)

It could be one of the other items within the array %aninternalactions()

RegiOween

unread,
May 15, 2020, 4:26:28 PM5/15/20
to tas...@googlegroups.com
Hello Rich D!

I did what you suggested, but with the same strange result in the toast.

Its always showing %anbutton4action1 or %aninternalactions4, as it seems parenthesis is just being ignored.

I tried to escape parenthesis with a \( and \) like I do in Linux shell scripting, but it didn't work as well.

I posted the same question in official AutoApps forum and in Tasker Reddit subs, anxiously waiting for more answers.

Thanks for your attention!


--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tasker/CADuUTAqihmp-ox87HOnznu2kL337ASQUpogTCEkQh3t%2BoDtW6g%40mail.gmail.com.

Rich D

unread,
May 15, 2020, 4:39:53 PM5/15/20
to Tasker Google Groups Post
Did you try just flashing

 %aninternalactions()

RegiOween

unread,
May 15, 2020, 4:45:41 PM5/15/20
to tas...@googlegroups.com
Yeah, and it shows a null string.


On Fri, May 15, 2020, 17:39 Rich D <ricp...@gmail.com> wrote:
Did you try just flashing

 %aninternalactions()

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.

Rich D

unread,
May 15, 2020, 5:11:55 PM5/15/20
to Tasker Google Groups Post
Ok, I just noticed something else with my actions. 

In the autonotification Query action: -> advanced -> internal actions Big -> type in a name for the variable, I used "testing" no quotes.  You will not need this but it seems to force  %aninternalactions() to get set. 

RegiOween

unread,
May 15, 2020, 5:33:11 PM5/15/20
to tas...@googlegroups.com
Tried with both Small and Big internal actions, with values -1 (to intercept all, as description says), but the same parenthesis ignoring problem happened.


On Fri, May 15, 2020, 18:11 Rich D <ricp...@gmail.com> wrote:
Ok, I just noticed something else with my actions. 

In the autonotification Query action: -> advanced -> internal actions Big -> type in a name for the variable, I used "testing" no quotes.  You will not need this but it seems to force  %aninternalactions() to get set. 

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.

Rich D

unread,
May 15, 2020, 6:19:10 PM5/15/20
to Tasker Google Groups Post

Rich D

unread,
May 15, 2020, 6:33:27 PM5/15/20
to Tasker Google Groups Post
  Here is the description.. 


  Volume Notification (1572)
    A1: AutoNotification Query [ Configuration:Persistency Type: Both
    Notification Apps: TrayVolume lite
    Internal Actions Small: testt
    Internal Actions Big: test Timeout (Seconds):20 ] 
    A2: Flash [ Text:%aninternalactions() Long:On ] 
    A3: AutoNotification Actions [ Configuration:Notification Apps: TrayVolume lite
    Intercept Action ID: %aninternalactions(3) Timeout (Seconds):20 ] 
    

Rich D

unread,
May 15, 2020, 6:41:12 PM5/15/20
to Tasker Google Groups Post
That will do the volume up. For mute use %aninternalactions(2)


RegiOween

unread,
May 15, 2020, 7:09:11 PM5/15/20
to Tasker
I tried your code with both %aninternalactions(4) and %anbutton4action(1), also testing the button numbers from 1 to 5.

I'm lost on this one...

RegiOween

unread,
May 15, 2020, 7:10:01 PM5/15/20
to Tasker
20.08.25/ActionArgBundle key: ButtonText: replace <null> String value with null
20.08.25/ActionArgBundle key: PackageName: replace <null> String value with null
20.08.25/ActionArgBundle key: App: replace <null> String value with null
20.08.25/ActionArgBundle key: Text: replace <null> String value with null
20.08.25/ActionArgBundle key: Title: replace <null> String value with null
20.08.25/Variables doreplresult: |%aninternalactions(1)| -> |%aninternalactions1|
20.08.25/ActionArgBundle AutoNotification Actions: InterceptActionId: %aninternalactions(1) -> %aninternalactions1
20.08.25/E FIRE PLUGIN: AutoNotification Actions / com.twofortyfouram.locale.intent.action.FIRE_SETTING: 31 bundle keys
20.08.25/E AutoNotification Actions: plugin comp: com.joaomgcd.autonotification/com.joaomgcd.autonotification.broadcastreceiver.IntentServiceFire
20.08.25/E add wait type Plugin1 time 20
20.08.25/E add wait type Plugin1 done
20.08.25/E handlePluginFinish: taskExeID: 1 result 3
20.08.25/E pending result code
20.08.25/E add wait task
20.08.25/E Error: 2018614444
20.08.25/E Intercepted Action not performed. The tasker variable %aninternalactions1 doesn't have a value.

Rich D

unread,
May 15, 2020, 7:18:38 PM5/15/20
to Tasker Google Groups Post
I tried your code with both %aninternalactions(4) and %anbutton4action(1), also testing the button numbers from 1 to 5.

I'm lost on this one...

Did you download the link or make you own actions?

What did the flash show when you download and run the task without changing anything? It should show a few lines of alpha numerics. 

Rich D

unread,
May 15, 2020, 7:26:19 PM5/15/20
to Tasker Google Groups Post
I would also try a reboot to ensure everything is synced. 

Jimmy Jimmy

unread,
May 15, 2020, 8:04:39 PM5/15/20
to Tasker
How about just %anbutton1action, %anbutton2action, %anbutton3action, %anbutton4action? The variables, not arrays. Does it show anything?

Rich D

unread,
May 15, 2020, 8:21:13 PM5/15/20
to Tasker Google Groups Post

How about just %anbutton1action, %anbutton2action, %anbutton3action, %anbutton4action? The variables, not arrays. Does it show anything?

Nope.  These are custom notification buttons. You need to use %aninternalactions()

RegiOween

unread,
May 16, 2020, 12:37:48 PM5/16/20
to Tasker
Another important info that maybe can help you help me...

After the AutoNotification Query, I flashed the following arrays, using the # symbol to show the number of elements in the array:

%anapp  [returns: Tray Volume lite]
%anapp(#)  [returns: 1]
%anbutton1action(#)  [returns: 0]
%aninternalactions(#)  [returns: 0]

This result clearly shows that the button related arrays are not being filled, so that's the reason AutoNotification Action isn't working.

And now the scary info: I also tested with the plugin 'Notification Listener', and their button related arrays aren't being filled either, so of course the problem is not with AutoNotification.

Now I'm completely lost on this issue...

Rich D

unread,
May 16, 2020, 1:05:32 PM5/16/20
to Tasker Google Groups Post
Did you download the tasker link or did you build these actions yourself?

Could you also post the exported description of what you were trying?

Rich D

unread,
May 16, 2020, 1:18:41 PM5/16/20
to Tasker Google Groups Post
I just installed that app on my other device and downloaded the tasker link and it worked first time.  I assume you have this notification in your notify bar when testing?
Screenshot_20200516-131628.png

Rich D

unread,
May 16, 2020, 1:46:18 PM5/16/20
to Tasker Google Groups Post
To confirm... This is the app, correct?
Screenshot_20200516-134242.png

RegiOween

unread,
May 16, 2020, 2:05:56 PM5/16/20
to Tasker
I imported the downloaded task and also build one, with the same null results.

RegiOween

unread,
May 16, 2020, 2:07:23 PM5/16/20
to Tasker
The exported description, as requested:

Mute
        A1: AutoNotification Query [ Configuration:Persistency Type: Persistent Only
    Notification Apps: TrayVolume lite
    Get All Fields : true
    Internal Actions Small: -1
    Internal Actions Big: -1 Timeout (Seconds):20 ]
        A2: Flash [ Text:%anapp
    %anapp(#)
    %anbutton1action(#)
    %aninternalactions(#) Long:On ]

On Saturday, May 16, 2020 at 2:05:32 PM UTC-3, Rich D wrote:

RegiOween

unread,
May 16, 2020, 2:10:56 PM5/16/20
to Tasker
That's exactly the app I'm using.
I just can't find an explainable reason why isn't working for me, besides my system being rooted...

Rich D

unread,
May 16, 2020, 2:21:48 PM5/16/20
to Tasker Google Groups Post
My pixel 2xl is rooted.

Also try changing Persistence to both.



[ Configuration:Persistency Type: Both

Your export shows..  Persistent Only

Rich D

unread,
May 16, 2020, 2:23:34 PM5/16/20
to Tasker Google Groups Post
And the notification is in the notify bar as shown above?

Rich D

unread,
May 16, 2020, 2:28:22 PM5/16/20
to Tasker Google Groups Post
Did you also try the reboot?

Rich D

unread,
May 16, 2020, 2:35:06 PM5/16/20
to Tasker Google Groups Post
Are you using the check mark in the upper right of the tasker UI to save data in between changes?

Rich D

unread,
May 16, 2020, 2:37:40 PM5/16/20
to Tasker Google Groups Post
The only other thing I can think of would be a permission issue. here are the screenshots of the permissions I have for auto notification. 
Screenshot_20200516-143527.png
Screenshot_20200516-143538.png

RegiOween

unread,
May 16, 2020, 3:27:09 PM5/16/20
to tas...@googlegroups.com
Yes, the notification shows, and works as intended with manually tapping in the buttons.

On Sat, May 16, 2020 at 3:23 PM Rich D <ricp...@gmail.com> wrote:
And the notification is in the notify bar as shown above?

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.

RegiOween

unread,
May 16, 2020, 3:27:40 PM5/16/20
to tas...@googlegroups.com
Yes.

On Sat, May 16, 2020 at 3:28 PM Rich D <ricp...@gmail.com> wrote:
Did you also try the reboot?

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.

RegiOween

unread,
May 16, 2020, 3:38:39 PM5/16/20
to tas...@googlegroups.com
I gave full permissions for both Tasker and AutoNotification on my system, just for check purposes, but it didn't work, so I set them back to normal.

I will install an Android 7.1 on a VirtualBox, just to dive deep into that issue, and try to understand what is causing that weird and mysterious behaviour on my phone...

On Sat, May 16, 2020 at 3:37 PM Rich D <ricp...@gmail.com> wrote:
The only other thing I can think of would be a permission issue. here are the screenshots of the permissions I have for auto notification. 

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.

RegiOween

unread,
May 20, 2020, 11:04:29 PM5/20/20
to Tasker
Hello, folks!

The post is a little bit long, so read if you have some patience, and if you like to know quickly what I had to spend days to figure out, due to my strict lack of time...

After a few days fighting hard against that evil problem (evil for me, at least) I finally managed to understand, and better yet, win over the enemy...

First things first:
It wasn't a problem with Tasker, or AutoNotification, or my device.
Neither it was a problem with this crazy drunk man who are talking to you now...

As I said in my first post, I was using Android 7.1.1 (Stock Nougat for Moto X Play devices).
Of course I rooted my phone (I can't live without root), so I started to think the problem was related to my phone being rooted. I was wrong.

To avoid messing up with my phone (which I use to work as a Uber driver) I decided to make extensive tests in a virtual machine, being VirtualBox my favourite gun for that.
The very cool thing about that kind of setup is that we can do anything stupid without compromise nothing at all. Very idiot-proof testing environment... Perfect for me!

So I first installed Android 10 (aka Q). Failed!
The AutoNotification arrays didn't fill correctly.

Then I installed Android 9 (aka Pie). Worked!
The AutoNotification arrays filled correctly, but a detail very important to me:
After I finished my tests with Tasker, AutoNotification and TrayVolume, I also installed Substratum Theme Engine with Swift Black theme (my favourite one), and it didn't work for some OS screens (like notification  tray) and some apps (like WhatsApp).

Then I installed Android 8.1 (aka Oreo). Worked!
But exactly the very same problems as 9.0...

Then I installed Android 7.1.2 (aka updated Nougat). Worked!
The AutoNotification arrays filled correctly, and Substratum Theme Engine with Swift Black theme are working flawlessly!
The one detail I got with this version is that I can't temporarily disable my second SIM card, since it has no options to do that, but minor detail, since I can block the SIM with its PIN number or simply eject it from my phone.

I couldn't find an Android 7.1.1 to test in VirtualBox, but since my phone was using that version, I believe versions 7.1.1 and 10.0 are the the ones to blame if you face some similar problem as mine.

Now, my phone will be using Android 7.1.2 till one of us die!
I really hope my phone gets this chance first...

Many many thanks to Rich D, for trying to help me with very wise suggestions, like using the array%aninternalactions() instead of %anbutton#action(). It wouldn't be possible to solve this problem without his help.
Now I own him a box of cold beer. I hope he likes it as much as I do...

Take care, stay safe, and we meet on a next post!

Marta Hintz

unread,
May 20, 2020, 11:36:09 PM5/20/20
to Tasker
Very cool to give your summary..... Helpful!!!! :-)

RegiOween

unread,
May 21, 2020, 1:10:32 AM5/21/20
to tas...@googlegroups.com
Very cool to get your feedback... Enjoyful!!! :-)

On Thu, May 21, 2020, 00:36 Marta Hintz <lar...@gmail.com> wrote:
Very cool to give your summary..... Helpful!!!!  :-)

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.

Rich D

unread,
May 21, 2020, 4:57:13 AM5/21/20
to Tasker Google Groups Post
Whewww.. Glad you got it working. Good to know there is a possible issue in Android 10 if this comes up again..  



Now, my phone will be using Android 7.1.2 till one of us die!
I really hope my phone gets this chance first...

Ha.. I feel the exact same way... My pixel 2 XL is on the latest Android 9 and I will not  be updating any time soon. Maybe some day when Google "gets there mind right"....   

Reply all
Reply to author
Forward
0 new messages