I am interested in adding and setting up a hard-coded Google Account with a given username and password programmatically on the phone without any user intervention.
I have tried using
AccountsManager.addAccountExplicitly(newAccount("xxxxxx@gmail.com","com.google",password,null)
It works perfectly for all the accountsType
except for the com.google accountsType
throwing the "uid not matching authenticator
id" exception.
I have already followed all the suggestions given in this particular thread for fixing the error but of no use, the error persists for com.google accounts type
SecurityException: caller uid XXXX is different than the authenticator's uid
The other alternative approach I tried was using the samplesyncadapter
code, it works perfectly fine, the authentication part is done in NetworkUtilities
file which I believe need to be changed to Google accounts clientlogin
Is there anyway this can be performed directly without user intervention for captcha??