Package-level declarations
Types
If you are developing an Android application and want to know what is happening in the Spotify app, you can subscribe to broadcast notifications from it. The Spotify app can posts sticky media broadcast notifications that can be read by any app on the same Android device. The media notifications contain information about what is currently being played in the Spotify App, as well as the playback position and the playback status of the app.
Data from a broadcast event
Broadcast receiver types. These must be turned on manually in the Spotify app settings.
A metadata change intent is sent when a new track starts playing. It uses the intent action com.spotify.music.metadatachanged.
A playback state change is sent whenever the user presses play/pause, or when seeking the track position. It uses the intent action com.spotify.music.playbackstatechanged.
A queue change is sent whenever the play queue is changed. It uses the intent action com.spotify.music.queuechanged.
Functions
Register a Spotify broadcast receiver (receiving notifications from the Spotify app) for the specified notification types.