Spotify Default Credential Store
Provided credential store for holding current Spotify token credentials, allowing you to easily store and retrieve Spotify tokens. Recommended in most use-cases.
Parameters
The client id associated with your application
The application context - you can obtain this by storing your application context statically (such as with a companion object)
Properties
Get/set the current Spotify PKCE code verifier.
The EncryptedSharedPreferences that this API saves to/retrieves from.
Get/set the Spotify access token (the access token string, not the wrapped Token).
Get/set the Spotify refresh token.
Get/set the Spotify scope string.
Get/set the Spotify Token obtained from spotifyToken. If the token has expired according to spotifyTokenExpiresAt, this will return null.
Get/set when the Spotify access token will expire, in milliseconds from UNIX epoch. This will be one hour from authentication.
Functions
Returns whether the Token stored in this Credential Store is refreshable (whether there is a refresh token associated with it).
Clear the SharedPreferences instance corresponding to the Spotify credentials.
Create a new SpotifyClientApi instance using the spotifyToken stored using this credential store.
Create a new SpotifyImplicitGrantApi instance using the spotifyToken stored using this credential store.
Sets spotifyToken using SpotifyApi.token. This wraps around spotifyToken's setter.