public class GoogleSignInService extends Object
Modifier and Type | Method and Description |
---|---|
Task<GoogleSignInAccount> |
completeSignIn(Intent data)
This method completes the sign in of a google account.
|
GoogleSignInAccount |
getAccount()
This is the getter for the account.
|
static GoogleSignInService |
getInstance()
This is the getter for the google sign service instance.
|
Task<GoogleSignInAccount> |
refresh()
This method refreshes the google sign in.
|
static void |
setContext(Application context)
This is the t setter for the google sign in context.
|
Task<Void> |
signOut()
This method signs the user out.
|
void |
startSignIn(Activity activity,
int requestCode)
This method is starts the sign in with a google account.
|
public static void setContext(Application context)
public static GoogleSignInService getInstance()
public GoogleSignInAccount getAccount()
public Task<GoogleSignInAccount> refresh()
public void startSignIn(Activity activity, int requestCode)
activity
- is a reference to the Activity class.requestCode
- is the google sign in request code.public Task<GoogleSignInAccount> completeSignIn(Intent data)
data
- is a reference to th Intent class