Builder

class Builder(context: Context, token: String, secret: String)

This builder is a convenience class to reduce the number of parameters needed to construct a FeedAudioPlayer.

Make sure you use application context, so context is not leaked.

Constructors

Builder
Link copied to clipboard
fun Builder(context: Context, token: String, secret: String)

Functions

build
Link copied to clipboard
fun build(): AdaptrPlayer

Construct a new AdaptrPlayer with previously configured options.

setAvailabilityListener
Link copied to clipboard
fun setAvailabilityListener(availabilityListener: AvailabilityListener): AdaptrPlayer.Builder

Set optional AvailabilityListener to be notified when player is ready or not.

setClientId
Link copied to clipboard
fun setClientId(clientId: String): AdaptrPlayer.Builder

Optionally provide a client id to the player that was previously retrieved from clientId.

setCreateNewClientId
Link copied to clipboard
fun setCreateNewClientId(createNewClientId: Boolean): AdaptrPlayer.Builder

When true, the newly built player will create and persist a new client id, rather than use the one currently persisted on the device

setMockLocation
Link copied to clipboard
fun setMockLocation(location: MockLocations): AdaptrPlayer.Builder

Mock a new location for testing purposes. DO NOT USE IN PRODUCTION

Properties

context
Link copied to clipboard
val context: Context