Class A3LSignIn


  • public class A3LSignIn
    extends java.lang.Object
    Contains abstraction for GoogleSignIn Entry point for the A3LAuth API
    • Constructor Detail

      • A3LSignIn

        public A3LSignIn()
    • Method Detail

      • getLastSignedInAccount

        public static A3LSignInAccount getLastSignedInAccount​(@NonNull
                                                              android.content.Context context)
        Gets the last account that the user signed in with.
        Parameters:
        context - : A Context used to provide information about the application's environment.
        Returns:
        A3LSignInAccount: A3LSignInAccount from last known successful sign-in. If user has never signed in before or has signed out / revoked access, null is returned
      • hasPermissions

        public static boolean hasPermissions​(@NonNull
                                             A3LSignInAccount account,
                                             @NonNull
                                             java.lang.String... scopes)
        Determines if the given account has been granted permission to all given scopes.
        Parameters:
        account - : the A3LSignInAccount to be checked
        scopes - : the collection of scopes to be checked.
        Returns:
        boolean: true if the given account has been granted permission to all given scopes.
      • getSignedInAccountFromIntent

        public static com.google.android.gms.tasks.Task<A3LSignInAccount> getSignedInAccountFromIntent​(@NonNull
                                                                                                       android.content.Intent data)
        Method to fetch an A3LTask representing the Sign in for current intent.
        Parameters:
        data - : the Intent returned via Activity.onActivityResult(int, int, Intent) when sign in completed.
        Returns:
        Task: A completed Task containing a A3LSignInAccount object.