Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is Spotify able to open the desktop app via the Gmail inbox view?

Tags:

gmail

spotify

Screenshot of the "Listen in Spotify" button in Gmail

This is the first time I've ever seen a button like this (see right side). Clicking on that button launches Spotify. How is Spotify able to do this for their emails? Can this be done with other applications right now?

like image 657
jetcom Avatar asked Jun 17 '13 23:06

jetcom


People also ask

How do I open Spotify on desktop?

Open Spotify Desktop App. Automatically opens the Desktop Spotify app for open.spotify.com links. When you click a link to open Spotify on your computer you are normally taken to the website and then have to take a few more steps to open the app.

Why doesn't Spotify show my devices?

If the speaker does not appear on the list, try the following: Clear the Spotify app cache (usually done via the Settings menu). Restart your phone/tablet/PC. Unplug the Play-Fi product, and plug it back in.

Where are Spotify preferences?

Spotify - Preferences CNET Spotify's Preferences pane can be found under the File menu. Here you can link your Last.fm account, dictate what files from your local collection are imported, and alter settings for stream quality, automatic volume leveling, and others.

Is Spotify download safe?

Spotify doesn't contain any malware software, but make sure you only download the app from: spotify.com/download.


2 Answers

Disclaimer: I am a Spotify employee, but I haven't worked on this feature personally.

Google recently added support for markup that lets you embed interactive actions in your messages. You can see the blog post about this or the developer reference. The basic concept is that you embed some structured JSON data in your message, as in this example.

We embed markup in our notification emails that links to the Spotify Open site. For example, here's a link for Passenger — Holes: http://open.spotify.com/track/33lol6G1GUj0d3DyE1QzLw

If you have the Spotify desktop app installed, a redirect on that page to a spotify:track: URI will open the linked track in the desktop.

like image 93
Rohan Singh Avatar answered Oct 24 '22 16:10

Rohan Singh


I would say that it is probably either a feature of Gmail or Spotify has installed some kind of browser plugin that inserts this button onto any page that it wants.

Just like torrents, browsers can associate certain header types with specific programs for example torrents use the magnet:// url which the browser associates with an installed bit torrent client.

So I would assume that this button launches a url like spotify://this-is-a-song-name-987897/ which launches the Spotify program on your computer.

like image 37
M_Becker Avatar answered Oct 24 '22 16:10

M_Becker