AutoInput AutoInput to Activate Spotify Connect

Discussion in 'AutoApps' started by BenGmuN, Sep 28, 2015.

  1. BenGmuN

    BenGmuN New Member

    Joined:
    Sep 28, 2015
    Messages:
    25
    Likes Received:
    6
    Hi all - I'm new here, so please bear with me!
    I'm running a non-rooted Xperia Z3 and am trying to use AutoInput to launch Spotify, click now playing and then select the Spotify Connect menu before selecting my Wireless speakers. I have a Logitech Harmony remote and have configured my Harmony activities to send different IR commands to my PC which in turn fires a push to my phone and, thanks to the magic of Tasker, I can potentially use that push to trigger anything on Android. So my goal is to create a Spotify activity which will power on my home audio setup (all done via IR), then launch Spotify on my phone and make sure it plays via Spotify Connect.
    I've been using the AutoInput Action to capture where I'm clicking (easy setup). The action that clicks the 'Now playing' option at the bottom of the screen works, but then it doesn't appear to send the next input commands (even though each step in the Tasker task goes green).
    Any ideas? AutoInput appears to be reading the app fields correctly... Many thanks in advance.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,055
    Likes Received:
    768
    Can you please export your task's description (not xml) so I can take a look? Thanks
     
  3. BenGmuN

    BenGmuN New Member

    Joined:
    Sep 28, 2015
    Messages:
    25
    Likes Received:
    6
    Thank you, Joao :)

    Here you go:

    Find Spotify Connect Button (17)
    A1: Launch App [ App:Spotify Data: Exclude From Recent Apps:Off Always Start New Copy:Off ]
    A2: Wait [ MS:0 Seconds:4 Minutes:0 Hours:0 Days:0 ]
    A3: AutoInput Action [ Configuration:Type: Id
    Value: com.spotify.music:id/player_preview
    Action : Click Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):5 ]
    A4: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
    A5: AutoInput Action [ Configuration:Type: Id
    Value: com.spotify.music:id/connect_container
    Action : Click Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):5 ]
    A6: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
    A7: AutoInput Action [ Configuration:Type: Text
    Value: Home Theatre + Bedroom + Char's Radio
    Action : Click Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):5 ]
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,055
    Likes Received:
    768
    I just tried this myself. Seems spotify is making it hard for an accessibility service to click stuff in it... For example, I couldn't even get it to click on the now playing bar at the bottom.. :/ Can you still do it today after the app updated?
     
  5. BenGmuN

    BenGmuN New Member

    Joined:
    Sep 28, 2015
    Messages:
    25
    Likes Received:
    6
    Yeah, the Spotify App is a pain at the best of times! Apparently my Spotify app is up-to-date (v3.7.0.833 / 24-09-2015) and, yes, it works for me with the now playing bar. Thanks again for taking a look!
     
  6. BenGmuN

    BenGmuN New Member

    Joined:
    Sep 28, 2015
    Messages:
    25
    Likes Received:
    6
    Anybody any joy with this? Much obliged.
     

Share This Page