GoogleAuthUtil.getToken requires for it's second parameter an account object, but when you connect with Google SignIn what you get back in the result is a GoogleSignInAccount - which isn't the same thing. Is there a way to convert the GoogleSignInAccount to an Account object?
private void handleSignInResult(GoogleSignInResult result) {
if (result.isSuccess()) {
googleSignInAccount = result.getSignInAccount();
}
}
then later:
authToken = GoogleAuthUtil.getToken(context, [need an account here], scope);
I know that I can get the email address back by displaying the accountpicker, and I can also get the email address from the google signin result - but I can't see a way to get the entire account object.