Send intent to spotify to open "Add to Playlist" screen

Search This thread

necromundia

Member
Nov 13, 2013
8
0
Happy Sunday Folks,

How are ye keeping on this fine day?

My intent is to open the "Add to playlist" screen for the currently playing track on the android spotify app directly by sending an intent to Spotify through tasker (screen cap attached of "Add to Playlist" screen. From messing around with catlog, I have found an intent in the spotify sdk that unfortunately is not working in it's current iteration.

A1: Launch App [ App:Spotify Data: Exclude From Recent Apps:eek:ff Always Start New Copy:eek:ff ]
A2: AutoSpotify Player State [ Configuration:Warning: To receive media events from the Spotify app you need to set Device Broadcast Status to ON in the Spotify app’s settings. Package:com.joaomgcd.autospotify Name:AutoSpotify Player State Timeout (Seconds):20 ]
A3: Send Intent [ Action:com.spotify.music/com.spotify.mobile.android.spotlets.playlist.activity.AddToPlaylistActivity Cat:None Mime Type: Data:spotify:track:%astrackuri Extra: Extra: Extra: Package: Class: Target:Activity ]


May I kindly ask if ye could help me with this?
 

Attachments

  • Screenshot_2016-05-22-21-45-31.jpg
    Screenshot_2016-05-22-21-45-31.jpg
    143.1 KB · Views: 243

fritzgerald

Senior Member
Mar 8, 2007
472
184
Bakersfield
I was fighting to do the same thing with AddToPlaylist. I use Pandora but make playlists for a friend who uses Spotify, of what I'm listening to. Unfortunately I was able to get the AddToPlaylist intent run but nothing was added. Best I was able to pull off was use AutoInput to automate it for me. I've attached an export if you'd like to take a look and see if it can be adapted to what you want to accomplish.

Pulls title and artist from Pandora notification and sets to variable
Strips "()" and any text between them from variable(Spotify has issues finding songs for me)
Opens Spotify and searches for the variable
Long clicks on the first SONG result
Clicks add to playlist
Clicks first playlist
Clears search
Goes home

It can probably be cleaned up/improved but it works for what I need it to do.

Requires:
AutoInput plugin
Notification Listener plugin
KC Tasker Processes plugin
 

Attachments

  • Playlist_Maker.tsk.xml
    42.4 KB · Views: 143