You talk about the contacts you can change at google contacts, right? to change this contacts you have to Auth your app to google and then using the Google contacts API.
Thanks for replying.
I just want access to the internal contacts. Contacts2, fgContacts, ContactUtils and other libraries have fields like "Display Name", "Company", "Phones" ... but I cannot find any reference to the "Job Title" field.
Look here please. There is an example which reads the google contacts i´m talking about.
In that example only the "Names" of the contacts are read...
But the google-contacts have more than only names and telephonenumbers.
On googles contacts-website you can add a reference to "Job Title" and more
you there can create your own vars too. Like a pet for example
Erels example works fine. BUT it only reads contacts actually... You should easy be able to read the extended property JobTitle when you extends the example (reading the XML and parsing with sax xml parser)
@lagore has posted a library here which uses the google calendar api.
Maybe he like to make a lib for the Google contacts too (i would give a donation for this lib too )
Type cuOrganization(Company As String, Title As String)
Add this sub:
B4X:
Public Sub GetOrganization(Id As Long) As cuOrganization
Dim organizations As List = GetData("vnd.android.cursor.item/organization", Array As String("data1", "data4"), _
Id, Null)
Dim o As cuOrganization
If organizations.Size > 0 Then
o.Initialize
Dim obj() As Object = organizations.Get(0)
o.Company = obj(0)
o.Title = obj(1)
End If
Return o
End Sub
I would suggest an "official" update to ContactsUtils, in a couple of days someone else will ask the same and as usual they won't search the forums and find this post .