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.

Functions

component1
Link copied to clipboard
operator fun component1(): Boolean
component2
Link copied to clipboard
operator fun component2(): Int
component3
Link copied to clipboard
operator fun component3(): Long
copy
Link copied to clipboard
fun copy(playing: Boolean, positionInMs: Int, timeSentInMs: Long): SpotifyPlaybackStateChangedData
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String

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

(source)
Link copied to clipboard