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