Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 768
Prashanth Ambati Avatar asked Nov 08 '22 13:11

Prashanth Ambati


1 Answers

You can create Account from email address:

Account account = new Account(email,  GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE);
like image 152
pkleczko Avatar answered Nov 15 '22 04:11

pkleczko