AutoInput Ui Query in Notification Bar

Discussion in 'AutoApps' started by Yellowcard, Feb 26, 2017.

  1. Yellowcard

    Yellowcard New Member

    Joined:
    Feb 13, 2017
    Messages:
    3
    Likes Received:
    0
    Hello! Love AutoApps! I'm not that experienced yet but picking it up. ☺️ A question to whomever with the expertise:
    How do I get the Autoinput UI Query to see what is in the notification bar? I'm trying to press the Spotify Buttons in the notification bar (while Spotify is playing it has a persistent notification with play/pause and previous/next) with an Autoinput action. I could do it in the app but as I understand I have to make Autoinput bring the app to the front to use the Autoinput actions on different buttons and then go back to whatever app I was using while playing music. That seems ineffective and slow compared with using the notification bar buttons. Thanks a lot in advance!
     
  2. Yellowcard

    Yellowcard New Member

    Joined:
    Feb 13, 2017
    Messages:
    3
    Likes Received:
    0
    This question also goes for making a UI Query in general for things in the notification bar.
     
  3. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
  4. Yellowcard

    Yellowcard New Member

    Joined:
    Feb 13, 2017
    Messages:
    3
    Likes Received:
    0
    Thanks a lot! It works! ☺️
     
  5. alexcapone

    alexcapone New Member

    Joined:
    Nov 12, 2017
    Messages:
    9
    Likes Received:
    0
    How do I use uiquery to pick up the status of airplane mode in the notification panel?

    Sent from my SM-G965U using Tapatalk
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Unfortunately I don't think it can be done there sorry. You can do it this way though.
     
  7. Tasker Pro

    Tasker Pro New Member

    Joined:
    Jul 27, 2016
    Messages:
    22
    Likes Received:
    4
    You can do this on some devices, depending on how your notification panel is arranged. First you would use the Tasker Action Display > Status Bar > Expanded to get the panel expanded so AutoInput can 'see' it.

    Then you would use the UI Query action to have AutoInput take a look at what is there. Usually there is a text listing for Airplane Mode immediately followed by it's on/off status in the array %aitext() that the UI Query returns.

    To find out if UI Query can see your notification panel and all the text/info it returns - use this UI Query Helper Task.

    Here is an example from my Galaxy S7 of the %aitext() array where it shows the Airplane Mode status:

    Code (Text):
    9.  Do not,disturb,Off.,Button
    10.  Portrait,On.,Button
    11.  Flashlight,Off.,Button
    12.  Airplane,mode,Off.,Button
    This is a good method to track things that Tasker doesn't have variables for, however Tasker has the %AIR variable to give you the status of airplane mode without having to do the above ;)
     

Share This Page