SpotifyMetadataChangedData

data class SpotifyMetadataChangedData(playableUri: PlayableUri, artistName: String, albumName: String, trackName: String, trackLengthInSec: Int, timeSentInMs: Long) : SpotifyBroadcastEventData

A metadata change intent is sent when a new track starts playing. It uses the intent action com.spotify.music.metadatachanged.

Parameters

playableUri

A Spotify URI for the track or playable.

artistName

The track artist.

albumName

The album name.

trackName

The track name.

trackLengthInSec

Length of the track, in seconds.

timeSentInMs

When the notification was sent.

Constructors

SpotifyMetadataChangedData
Link copied to clipboard
fun SpotifyMetadataChangedData(playableUri: PlayableUri, artistName: String, albumName: String, trackName: String, trackLengthInSec: Int, timeSentInMs: Long)
A Spotify URI for the track or playable.

Properties

albumName
Link copied to clipboard
val albumName: String
The album name.
artistName
Link copied to clipboard
val artistName: String
The track artist.
playableUri
Link copied to clipboard
val playableUri: PlayableUri
A Spotify URI for the track or playable.
timeSentInMs
Link copied to clipboard
val timeSentInMs: Long
When the notification was sent.
trackLengthInSec
Link copied to clipboard
val trackLengthInSec: Int
Length of the track, in seconds.
trackName
Link copied to clipboard
val trackName: String
The track name.
type
Link copied to clipboard
val type: SpotifyBroadcastType
The type of the broadcast event

Sources

android source
Link copied to clipboard