initialize

fun initialize(context: Context, token: String, secret: String)

initalize the Adaptr service

Parameters

context

Application context

token

Your Adaptr Token

secret

your Adaptr Secret

fun initialize(builder: AdaptrPlayer.Builder)

Create a singleton AdaptrPlayer instance using the provided AdaptrPlayer.Builder and trigger an asynchronous request to the Adaptr servers for the list of available music stations. Only a single call should be made to this in the app lifetime.

Parameters

builder

A builder that will be used to create the singleton FeedAudioPlayer

Throws

if the provided builder is not fully configured and it's AdaptrPlayer.Builder.build call returns null, this will be thrown.