Terence Eden. He has a beard and is smiling.
Theme Switcher:

How can I launch a Spotify album from an NFC tag?

· 6 comments · 500 words · Viewed ~4,412 times


This is annoying me. So I'm posting in the hope someone can tell me what obvious thing I am missing.

I want to tap my phone against an NFC tag hidden in LP sleeve. Then I want my phone to automatically launch the Spotify app and for the app to display that album.

This should be simple, but I can't get it to work.

Spotify gives me an option to copy the album link, or Spotify URI. Spotify screen showing options.

Either:

  • https://open.spotify.com/album/6QaVfG1pHYl1z15ZxkvVDW
  • spotify :album:6QaVfG1pHYl1z15ZxkvVDW

So, I should be able to launch either of those and get my album, right? Wrong!

Thinking of linking

If I write the https link to an NFC chip, my Android phone opens it in the default browser. There is no option to launch the app from the browser. I've told Android that it should associate open.spotify.com links with the Spotify app, and to use the app to open them by default.

URIah Heap

If I write the spotify: link to an NFC chip, my Android phone opens the Spotify app! To the default Spotify page. It doesn't open the album.

Other things I've tried

  • spotify://6QaVfG1pHYl1z15ZxkvVDW opens default app page
  • Plain text records - displays the text, but no way to click on it.

And every other bloody combination I can think of!

I've asked in the Spotify community but no one has answered. I also tried asking on StackOverflow but no one knew the answer.

There is an Instructables project which gives some help but concludes that you need a separate app to manage the task flow. Similarly, there are tutorials for adding Spotify NDEF parsing to your own app. But both of these assume I want to install something else onto my phone. I don't. I just want Android to open the correct app to the correct screen.

What's causing this?

Spotify's Android manifest says it supports NDEF, but just using the Spotify scheme. The NDEF doesn't have any paths defined, whereas the http version does.

An XML tree of an Android Manifest.

Maybe that means that Android doesn't pass the info?

If I click on an open.spotify.com link - in a browser or elsewhere - then the Spotify app opens to the correct page.

Perhaps that means that Android's NFC parser sees a URI and passes it directly to the browser, rather than via a system intent?

I dunno, I'm at the edges of my knowledge here.

Help?

Update! Spotify engineers have confirmed that the manifest is at fault. No ETA for a fix.


Share this post on…

6 thoughts on “How can I launch a Spotify album from an NFC tag?”

  1. this is an elegant solution which just looks for a specific URI prefix and forward an intent with the content on to the Spotify app.

    Reply

  2. I was able to do it with NFC Tools for Android. I installed NFC Tools and NFC Tasks. - The first step is to get the URI of the first song in the album (IMPORTANT: if you write the URI of the album, Spotify will open it but it will not play it automatically). - Next, go to NFC Tools, Tasks tab. - Add a new URL/URI task and paste the copied URI there. - Write the label and you're done.

    Reply

    1. this is the best solution out of everything i've tried, because everything else literally just directs me to the spotify home page on the app and not the album i intended to link. my only issue is that the music doesn't play automatically, but the good thing is that the album is detected and i can just play the whole thing from there. (not sure if not being on premium has this drawback but i'll still take it.) thank you so so so so much for this!

      Reply

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

See allowed HTML elements: <a href="" title="">
<abbr title="">
<acronym title="">
<b>
<blockquote cite="">
<br>
<cite>
<code>
<del datetime="">
<em>
<i>
<img src="" alt="" title="" srcset="">
<p>
<pre>
<q cite="">
<s>
<strike>
<strong>

To respond on your own website, write a post which contains a link to this post - then enter the URl of your page here. Learn more about WebMentions.