Prashanth Ambati
Prashanth Ambati

Reputation: 124

Google api gettoken(Context,String,String) is now deprecated

I used to use the GoogleAuthUtil.gettoken(Context,String,String) method to obtain the access token. Now that it's deprecated, I'd like an alternative. I figured that it now takes Account as a parameter type, but I really don't know how that works. Any help will be appreciated. Thank you.

Upvotes: 5

Views: 664

Answers (1)

pkleczko
pkleczko

Reputation: 837

You can create Account from email address:

Account account = new Account(email,  GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE);

Upvotes: 1

Related Questions