guard Valid Spotify Api
fun <T> Activity.guardValidSpotifyApi(spotifyLoginImplementationClass: Class<out SpotifyLoginActivity>, classBackTo: Class<out Activity>? = null, block: () -> T): T?
Content copied to clipboard
Basic authentication guard - verifies that the user is logged in to Spotify and uses SpotifyDefaultAuthHelper to handle re-authentication and redirection back to the activity.
Note: this should only be used for small applications.
Parameters
spotifyLoginImplementationClass
Your implementation of SpotifyLoginActivity, defining what to do on Spotify login
classBackTo
The activity to return to if re-authentication is necessary
Sources
(source)
Link copied to clipboard