AutoNotification AutoNotification button click issue

Discussion in 'AutoApps' started by RegiOween, May 15, 2020.

  1. RegiOween

    RegiOween New Member

    Joined:
    May 15, 2020
    Messages:
    4
    Likes Received:
    0
    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 returns 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
     
  2. RegiOween

    RegiOween New Member

    Joined:
    May 15, 2020
    Messages:
    4
    Likes Received:
    0
    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.
    To make sure the problem was not with 'TrayVolume lite' app, I also tested with 'Floating Notes' (another notification app I use), and the button related arrays aren't filled for this app either.

    Now I'm completely lost on this issue...
     
    Last edited: May 16, 2020
  3. RegiOween

    RegiOween New Member

    Joined:
    May 15, 2020
    Messages:
    4
    Likes Received:
    0
    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!
     

Share This Page