AutoInput Logitech Harmony + Spotify + Tasker +AutoInput

Discussion in 'AutoApps' started by MrBumpisAlive, May 17, 2015.

  1. MrBumpisAlive

    MrBumpisAlive New Member

    Joined:
    May 17, 2015
    Messages:
    4
    Likes Received:
    0
    Pics
    Updated Pics

    Hey guys, just wondering if you can help me,

    Ive got a tablet setup running the Logitech Harmony Remote app.

    I was wondering if somehow, when i click in the app, to load the Spotify activity, it can load the spotify app in the background and play via tasker. I know how to get the app to load and all via tasker, just not when im selecting something in another app. Ive seen in the AutoInput app it can locate whats on the screen, so, thought it might be able to help me.

    Ive got the Harmony Tasker Plug-in, but, as far as im aware, thats just control of the the Harmony Hub via tasker. And i want to hopefully be able to have just the logitech harmony app open all the time, with tasker/autoinput doing stuff in the background if need be.

    I've got a thread over on Reddit with alot more information
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    AutoInput UI Action event condition detects clicks in apps. Maybe you can intercept the click with that. :) Can you try please?
     
    MrBumpisAlive likes this.
  3. MrBumpisAlive

    MrBumpisAlive New Member

    Joined:
    May 17, 2015
    Messages:
    4
    Likes Received:
    0
    Thanks for the reply!

    I'm very new to the Tasker/AutoInput apps, so, thanks for putting up with me.

    I actually didnt know that i could do a UI Action Event. hah

    So, what i've done now, is, Create a profile, Context Application. Add the Harmony app i want the UI action event to work in, then add another context to that profile, as the Autoinput Ui Action.

    Then i create a task. I put If %aielementtext ~ Spotify, Send intent to open spotify, Autoinput action to play spotify, End If.

    I'm not sure what im missing, and im sure i have, because its not working?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Ok, can you export that profile so I can check it out? (description, not xml). Also, before doing that, can you add a flash action at the beginning of the task with the text %aielementtext so that it shows what you're clicking?
    But yeah, you have the right idea :)
     
    MrBumpisAlive likes this.
  5. MrBumpisAlive

    MrBumpisAlive New Member

    Joined:
    May 17, 2015
    Messages:
    4
    Likes Received:
    0
    Profile: Harmony (21)
    Application: Harmony
    Event: AutoInput UI Action [ Configuration:Reacting to clicks on the Android UI ]
    Enter: Logitech Harmony (15)
    A1: If [ %aielementtext ~ Spotify ]
    A2: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
    A3: Send Intent [ Action:android.intent.action.VIEW Cat:Default Mime Type: Data:spotify:user:USERNAME:playlist:pLAYLISTURI Extra: Extra: Package: Class: Target:Activity ]
    A4: AutoInput Action [ Configuration:Type: Text
    Value: SHUFFLE
    Action : Click Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
    A5: End If

    I was unsure what a flash action is. Im currently trying to find out what that means. sorry
     
  6. MrBumpisAlive

    MrBumpisAlive New Member

    Joined:
    May 17, 2015
    Messages:
    4
    Likes Received:
    0
    As far as im aware, I seem to have it working with the above profile. I ended up just restarting my tablet, and it seems to have done the trick. ill keep digging. thank you so much for the help!
     

Share This Page