Spotify Default Credential Store
class SpotifyDefaultCredentialStore(clientId: String, redirectUri: String, applicationContext: Context)
Content copied to clipboard
Provided credential store for holding current Spotify token credentials, allowing you to easily store and retrieve Spotify tokens. Recommended in most use-cases.
Parameters
clientId
The client id associated with your application
applicationContext
The application context - you can obtain this by storing your application context statically (such as with a companion object)
Constructors
SpotifyDefaultCredentialStore
Link copied to clipboard
fun SpotifyDefaultCredentialStore(clientId: String, redirectUri: String, applicationContext: Context)
Content copied to clipboard
The client id associated with your application
Types
Functions
canApiBeRefreshed
Link copied to clipboard
Returns whether the Token stored in this Credential Store is refreshable (whether there is a refresh token associated with it).
clear
Link copied to clipboard
Clear the SharedPreferences instance corresponding to the Spotify credentials.
getSpotifyClientPkceApi
Link copied to clipboard
fun getSpotifyClientPkceApi(block: SpotifyApiOptions.() -> Unit? = null): SpotifyClientApi?
Content copied to clipboard
getSpotifyImplicitGrantApi
Link copied to clipboard
fun getSpotifyImplicitGrantApi(block: SpotifyApiOptions.() -> Unit? = null): SpotifyImplicitGrantApi?
Content copied to clipboard
Create a new SpotifyImplicitGrantApi instance using the spotifyToken stored using this credential store.
setSpotifyApi
Link copied to clipboard
Properties
credentialTypeStored
Link copied to clipboard
encryptedPreferences
Link copied to clipboard
The EncryptedSharedPreferences that this API saves to/retrieves from.
spotifyAccessToken
Link copied to clipboard
Get/set the Spotify access token (the access token string, not the wrapped Token).
spotifyRefreshToken
Link copied to clipboard
spotifyToken
Link copied to clipboard
spotifyTokenExpiresAt
Link copied to clipboard
Sources
(source)
Link copied to clipboard