register Spotify Broadcast Receiver
fun Context.registerSpotifyBroadcastReceiver(receiver: AbstractSpotifyBroadcastReceiver, vararg notificationTypes: SpotifyBroadcastType)(source)
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
notification Types
The notification types that you would like to subscribe to.