guardValidImplicitSpotifyApi

fun <T> Activity.guardValidImplicitSpotifyApi(spotifyImplicitLoginImplementationClass: Class<out SpotifyImplicitLoginActivity>, classBackTo: Class<out Activity>? = null, block: () -> T): T?(source)

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