register Spotify Broadcast Receiver
fun Context.registerSpotifyBroadcastReceiver(receiver: AbstractSpotifyBroadcastReceiver, vararg notificationTypes: SpotifyBroadcastType)
Content copied to clipboard
Register a Spotify broadcast receiver (receiving notifications from the Spotify app) for the specified notification types.
This should be used in a Fragment or Activity.
Note that "Device Broadcast Status" must be enabled in the Spotify app and the active Spotify device must be the Android device that your app is on to receive notifications.
Parameters
receiver
An instance of your implementation of AbstractSpotifyBroadcastReceiver
notificationTypes
The notification types that you would like to subscribe to.
Sources
(source)
Link copied to clipboard