Modifier and Type | Method and Description |
---|---|
<T extends Item,S extends Item> |
call(java.lang.String uri,
S argument,
java.lang.Class<T> resultType) |
static void |
connect(android.content.Context context,
ConnectionParams params,
Connector.ConnectionListener connectionListener)
Connect to get an instance of SpotifyAppRemote.
|
static void |
disconnect(SpotifyAppRemote spotifyAppRemote)
Disconnect a SpotifyAppRemote from the Spotify app and release resources.
|
ConnectApi |
getConnectApi() |
ContentApi |
getContentApi() |
ImagesApi |
getImagesApi() |
PlayerApi |
getPlayerApi() |
UserApi |
getUserApi() |
boolean |
isConnected() |
static boolean |
isDebugMode() |
static boolean |
isSpotifyInstalled(android.content.Context context)
Check if a Spotify app is installed on this device
|
static void |
setDebugMode(boolean isDebug)
Enable excessive logging.
|
<T extends Item> |
subscribe(java.lang.String uri,
java.lang.Class<T> eventType) |
public static void connect(android.content.Context context, ConnectionParams params, Connector.ConnectionListener connectionListener)
context
- a valid Android contextparams
- parameters to identify and configure the connectionconnectionListener
- a listener that will be called when the connection is successful,
fails or is lostpublic static void disconnect(SpotifyAppRemote spotifyAppRemote)
spotifyAppRemote
- the SpotifyAppRemote you want to disconnect or null (will do nothing)@Nonnull public ImagesApi getImagesApi()
getImagesApi
in interface AppRemote
ImagesApi
for fetching images from the Spotify app@Nonnull public PlayerApi getPlayerApi()
getPlayerApi
in interface AppRemote
PlayerApi
representation of the Spotify app player@Nonnull public UserApi getUserApi()
getUserApi
in interface AppRemote
@Nonnull public ContentApi getContentApi()
getContentApi
in interface AppRemote
@Nonnull public ConnectApi getConnectApi()
getConnectApi
in interface AppRemote
public boolean isConnected()
isConnected
in interface AppRemote
public static boolean isSpotifyInstalled(android.content.Context context)
context
- a valid Android contextpublic static void setDebugMode(boolean isDebug)
isDebug
- set to true to enable debug mode, false to disablepublic static boolean isDebugMode()
@Nonnull public <T extends Item,S extends Item> CallResult<T> call(@Nullable java.lang.String uri, @Nullable S argument, @Nullable java.lang.Class<T> resultType)
@Nonnull public <T extends Item> Subscription<T> subscribe(@Nullable java.lang.String uri, @Nullable java.lang.Class<T> eventType)