SpotifyLoginActivity

interface SpotifyLoginActivity

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 AbstractSpotifyAppLoginActivity or AbstractSpotifyAppCompatLoginActivity

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getRequestingScopes
Link copied to clipboard
abstract fun getRequestingScopes(): List<SpotifyScope>
Return the scopes that you are going to request from the user here.
hashCode
Link copied to clipboard
open fun hashCode(): Int
onAuthenticationFailed
Link copied to clipboard
abstract fun onAuthenticationFailed(errorMessage: String)
Override this to define what to do after authentication has failed.
onSuccessfulAuthentication
Link copied to clipboard
abstract fun onSuccessfulAuthentication(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 onSuccessfulAuthentication has run.
toString
Link copied to clipboard
open fun toString(): String
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 SpotifyDefaultAuthHelper.activityBack.

Inheritors

AbstractSpotifyAppCompatLoginActivity
Link copied to clipboard
AbstractSpotifyAppLoginActivity
Link copied to clipboard

Sources

(source)
Link copied to clipboard