public class GoogleSignInService extends Object
Modifier and Type | Method and Description |
---|---|
Task<GoogleSignInAccount> |
completeSignIn(Intent data)
this method checks for a completed sign-in.
|
GoogleSignInAccount |
getAccount()
Gets back the associated google account.
|
static GoogleSignInService |
getInstance()
A method that gets the instance of the Google Sign In sevice
|
Task<GoogleSignInAccount> |
refresh()
A google task that silently signs the user in if their token is expired!
|
static void |
setContext(Application context)
A setter for the context
|
Task<Void> |
signOut()
This task is a google task that signs out the user.
|
void |
startSignIn(Activity activity,
int requestCode)
A method that starts the Sign in activity.
|
public static void setContext(Application context)
context
- an application object that gives the service a context.public static GoogleSignInService getInstance()
public GoogleSignInAccount getAccount()
public Task<GoogleSignInAccount> refresh()
public void startSignIn(Activity activity, int requestCode)
activity
- an activity object.requestCode
- an int, the request code to start the signIn process.public Task<GoogleSignInAccount> completeSignIn(Intent data)
data
- , another intent object.