I recently nabbed myself some NFC tags and I’m having a lovely time setting myself up with some nice automation.
I’ve popped one on my bathroom wall and set an alarm with Puzzle Alarm Clock which will only let me close it by tapping my phone to said tag. But that’s not all! I’ve also configured the tag to run a Tasker task which will automatically play a Spotify playlist I’ve created, and then open up reddit is fun for when I sit down.
The thing is, for some reason, it’s really difficult to find any sort of information online on how to get Tasker to open a playlist in Spotify and automatically play it. So here’s how!
- Create a new task.
- Add a Send Intent action. (System > Send Intent)
- In the Action box, paste the following: android.media.action.MEDIA_PLAY_FROM_SEARCH
- In the Data box, paste the Spotify URI for your playlist. (You can get this by right clicking the playlist in the desktop Spotify client and clicking on “Copy Spotify URI”
- Under Target, select Activity.
And… that’s it! It’s surprisingly straightforward, yet barely documented. Most tutorials I found seem to encourage the use of something like Media Utilities, but those methods seem convoluted and barely even seem to work.