Class 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.Intent createAuthActivityIntent​(android.content.Context context)
      Creates an intent that will launch the auth flow on the currently installed Spotify application
      static boolean isSpotifyInstalled​(android.content.Context context)
      Check if a version of the Spotify main application is installed
      boolean startAuthActivity()  
      void stopAuthActivity()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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()