Have you tried with Contacts?
Basic4android - Phone
In most cases Android does it automatically. Once you set the device Gmail account, it imports all the contacts from Gmail to the internal contacts.
Have a look at: Google Contacts Data API - Google Code
I havent read it yet myself but I am sure this is what you need!
EDIT:
Also look at: Developer's Guide - Google Contacts Data API - Google Code
There is also Java code. You might be able to roll your own library.
I think modifying Erel's Dropbox example in b4a should help.
It uses OAuth as well (I am not sure of OAuth 2.0)
Hopefully it should just be a matter of changing the address URLs and parsing the response.
I will try later today (if I get the time).
Hi Margret,
I think at this time it can be done only with the help of Http Lib.
I made a search and found an opensource webservice named Open Inviter - Free Import contacts and integrate with CMS like PunBB, PhpBB, PHPMELODY and many more.
They provide lots of contact importing services including gmail...
I downloaded and attached their gmail plugin in written in PHP to get contact list..
If you look for a way to translate this PHP code to use it with b4a with the help of Http Lib, maybe this can solve your problem.
mykey = "https://accounts.google.com/o/oauth2/auth?" & _
"client_id=xxx.apps.googleusercontent.com&" & _
"redirect_uri=urn:ietf:wg:oauth:2.0:oob&" & _
"scope=https://www.google.com/m8/feeds/&" & _
"response_type=code"
w1.LoadUrl(mykey)
https://www.google.com/m8/feeds/contacts/default/full?access_token=1/fFAGRNJru1FTz70BzhT3Zg
Hi margret,
Dont know if you have up with an alternative solution already, because I am just too slow!
Okay, here it is.
This project will retrieve the google contacts for you. However, it is returned in an XML file and I havent parsed that.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?