NFC + Spotify Albums + Chromecast Audio

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
mariowarner
Posts: 2
Joined: 11 Feb 2020 21:42

NFC + Spotify Albums + Chromecast Audio

Post by mariowarner » 13 Feb 2020 16:05

Hey guys,

I thought it would be a good idea to learn how to use Automagic in transposing the following Automate flowchart to Automagic. But after a few hours I have to come to the conclusion that I don't understand the app well enough... I was wondering if anyone of you could make a tutorial on how to get this working with Automagic?

https://www.instructables.com/id/Albums ... y-Spotify/

The thing is the flowchart doesn't work anymore as when I try to use it, it stops at the Spotify search field without opening and playing the album...

Any help would be appreciated :)

Thanks and have a great day!

User avatar
Yam
Posts: 54
Joined: 23 Nov 2019 09:07

Re: NFC + Spotify Albums + Chromecast Audio

Post by Yam » 14 Feb 2020 05:40

I haven't really worked much with nfc tags, but if you are already able to recieve nfc data. You can use an activity to pass that data to spotify


Let's say value = "Blue orchid white stripes"

Start activity:

Code: Select all

Action:
android.intent.action.SEARCH

✅ Explicit content
Package name:
com.spotify.music

Extras:
putString("query", value);

Control UI:

Code: Select all

sleep(1200);
clickById("android:id/text1");

Output:
Open spotify, search with value, click first option (which usually plays the song.


Hope this helps!
Every life altering decision you have made, has lead to you reading this.

mariowarner
Posts: 2
Joined: 11 Feb 2020 21:42

Re: NFC + Spotify Albums + Chromecast Audio

Post by mariowarner » 18 Feb 2020 03:47

Thanks! I've found an (I think) easier way to at least open the right album (using a Spotify URL and the "Open URL in browser" action).

Now I'd need the following information to make it work :

1. How could I specify to search the browser with the URI written on the NFC tag? (right now I have written the search query in the action, but I'd like the tag to dictate the search query)
2. How can I click on the first song of the album to make it play?
3. How could I select a specific chromecast audio device and enable it?

Again, thanks for your time,

Mario

User avatar
Yam
Posts: 54
Joined: 23 Nov 2019 09:07

Re: NFC + Spotify Albums + Chromecast Audio

Post by Yam » 18 Feb 2020 09:51

1.) Im not sure if you can program the tag ID, and use a "script" or "expression" to read the {nfc_tag_ids} variable.

2.) See my original reply "control UI". That's the only way i can see it.

3.) I'm uncertain as the application would need to control it.
Once again you can use control UI tags to initiate it automatically. Maybe a condition which checks the audio playback channel? I'm unsure if that'll work
Every life altering decision you have made, has lead to you reading this.

Annie_Yazbeck
Posts: 7
Joined: 12 Oct 2018 10:31

Re: NFC + Spotify Albums + Chromecast Audio

Post by Annie_Yazbeck » 18 Mar 2020 03:45

The thing I know is Spotify and Chromecast Audio. It's well known that Spotify allows users to stream Spotify music, album, playlists via the Google Cast to Chromecast device.
There are two ways to cast Spotify to Chromecast. One is using the Google Cast function to stream it. The other is to use a professional Spotify Downloader Mac to download Spotify music to USB and then listen to Spotify on Chromecast via the USB port.

Post Reply