SpotifyImplicitLoginActivity

interface SpotifyImplicitLoginActivity

Wrapper around spotify-auth's LoginActivity that allows configuration of the authentication process, along with callbacks on successful and failed authentication. Pair this with SpotifyDefaultCredentialStore to easily store credentials. To use, you must extend from either AbstractSpotifyAppImplicitLoginActivity or AbstractSpotifyAppCompatImplicitLoginActivity

Functions

getRequestingScopes
Link copied to clipboard
abstract fun getRequestingScopes(): List<SpotifyScope>
Return the scopes that you are going to request from the user here.
onFailure
Link copied to clipboard
abstract fun onFailure(errorMessage: String)
Override this to define what to do after authentication has failed.
onSuccess
Link copied to clipboard
abstract fun onSuccess(spotifyApi: SpotifyImplicitGrantApi)
Override this to define what to do after authentication has been successfully completed.
processActivityResult
Link copied to clipboard
open fun processActivityResult(requestCode: Int, resultCode: Int, intent: Intent?)
Processes the result of LoginActivity, invokes callbacks, then finishes.
redirectAfterOnSuccessAuthentication
Link copied to clipboard
open fun redirectAfterOnSuccessAuthentication()
Override this to define what to do after onSuccess has run.
triggerLoginActivity
Link copied to clipboard
open fun triggerLoginActivity()
Trigger the actual spotify-auth login activity to authenticate the user.

Properties

activity
Link copied to clipboard
abstract val activity: Activity
clientId
Link copied to clipboard
abstract val clientId: String
Your application's Spotify client id.
redirectUri
Link copied to clipboard
abstract val redirectUri: String
Your application's Spotify redirect id - NOTE that this should be an android scheme (such as spotifyapp://authback) and that this must be registered in your manifest.
state
Link copied to clipboard
abstract val state: Int
The state to use to verify the login request.
useDefaultRedirectHandler
Link copied to clipboard
abstract val useDefaultRedirectHandler: Boolean
Disable if you will not be using useDefaultRedirectHandler but will be setting SpotifyDefaultImplicitAuthHelper.

Inheritors

Sources

android source
Link copied to clipboard