Package com.spotify.sdk.android.auth.app
Class SpotifyNativeAuthUtil
- java.lang.Object
-
- com.spotify.sdk.android.auth.app.SpotifyNativeAuthUtil
-
public class SpotifyNativeAuthUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SpotifyNativeAuthUtil(android.app.Activity contextActivity, AuthorizationRequest request, com.spotify.sdk.android.auth.app.Sha1HashUtil sha1HashUtil)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static android.content.IntentcreateAuthActivityIntent(android.content.Context context)Creates an intent that will launch the auth flow on the currently installed Spotify applicationstatic booleanisSpotifyInstalled(android.content.Context context)Check if a version of the Spotify main application is installedbooleanstartAuthActivity()voidstopAuthActivity()
-
-
-
Constructor Detail
-
SpotifyNativeAuthUtil
public SpotifyNativeAuthUtil(android.app.Activity contextActivity, AuthorizationRequest request, @NonNull com.spotify.sdk.android.auth.app.Sha1HashUtil sha1HashUtil)
-
-
Method Detail
-
startAuthActivity
public boolean startAuthActivity()
-
createAuthActivityIntent
@Nullable public static android.content.Intent createAuthActivityIntent(@NonNull android.content.Context context)Creates an intent that will launch the auth flow on the currently installed Spotify application- Returns:
- The auth Intent or null if the Spotify application couldn't be found
-
isSpotifyInstalled
public static boolean isSpotifyInstalled(@NonNull android.content.Context context)Check if a version of the Spotify main application is installed- Parameters:
context- The context of the caller, used to check if the app is installed- Returns:
- True if a Spotify app is installed, false otherwise
-
stopAuthActivity
public void stopAuthActivity()
-
-