Google account

attenzi0ne

Member
Licensed User
Longtime User
Hello everyone

I need to use the push service of google in my application and my problem is with google accounts.
Inorder for the push service to work, the phone needs to be set up with a google account. The application will be used by a company and the phones are not initially set up with a google account. Would it be possible to add a google account to the system without user interaction? Lets say once the application is turned on, it will fetch the required information from the server and add the account automatically to the phone, is there a way to accomplish this?

Best regards
 

NeoTechni

Well-Known Member
Licensed User
Longtime User
Yes, you'd just need to store your settings file online somewhere easily downloadable.

I suggest sites.google.com and encrypting the settings file.
 
Upvote 0

attenzi0ne

Member
Licensed User
Longtime User
Thanks a lot for your quick reply!

Can you also tell me in what format the settings file needs to be and where I should put it after I download to the phone?
 
Upvote 0

attenzi0ne

Member
Licensed User
Longtime User
I've searched all over the place but I just dont understand how I should accomplish this. As far as I found, I need these two files:
/data/system/accounts.db
/data/system/sync/accounts.xml

But they are not accessible on a non-rooted device. I can invoke Add_Account from AccountManager but that is not what I need. Is there a way to do this without user interaction? Can you please be specific and provide with a code sample?

Thanks in advance
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…