SpotifyPlaybackStateChangedData

data class SpotifyPlaybackStateChangedData(playing: Boolean, positionInMs: Int, timeSentInMs: Long) : SpotifyBroadcastEventData

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.

Parameters

playing

True if playing, false if paused.

positionInMs

The current playback position in milliseconds.

timeSentInMs

When the notification was sent.

Constructors

SpotifyPlaybackStateChangedData
Link copied to clipboard
fun SpotifyPlaybackStateChangedData(playing: Boolean, positionInMs: Int, timeSentInMs: Long)
True if playing, false if paused.

Properties

playing
Link copied to clipboard
val playing: Boolean
True if playing, false if paused.
positionInMs
Link copied to clipboard
val positionInMs: Int
The current playback position in milliseconds.
timeSentInMs
Link copied to clipboard
val timeSentInMs: Long
When the notification was sent.
type
Link copied to clipboard
val type: SpotifyBroadcastType
The type of the broadcast event

Sources

android source
Link copied to clipboard