Reputation: 124
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
Reputation: 837
You can create Account from email address:
Account account = new Account(email, GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE);
Upvotes: 1