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


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…

  • Mastodon
  • Facebook
  • LinkedIn
  • BlueSky
  • Threads
  • Reddit
  • HackerNews
  • Lobsters
  • WhatsApp
  • Telegram

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

  1. adam chasen says:

    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. boisterious says:

    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

What are your reckons?

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

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