Jan 1, 2010
I'd like to query the contacts and create an RDF model (FOAF to be exact) from the data received. Therefore it would be necessary to know what kind of data I'm dealing with.
View 2 Replies
I'll need the following information about each contact: name, phone number(s), email address(es), IM ID(s) + corresponding IM service.
I thought that the best way to get this information was via the ContactsContract.Data table. So my query looks like this:
Cursor contactsTable = managedQuery(contactsURI, projection, where, whereArgs, null); </code>
(I need the DATA_VERSION to know if updating the model is necessary.)
Now I'd like to go through the table and add properties to my model for each entry. Therefore I'd need to know if the row I'm currently reading contains a name, an email address, a phone number or an IM ID (it would be best if I could also get information about the IM service the ID belongs to).
Is it possible to get the CONTENT_ITEM_TYPE or anything like that? Or should I perform a single query for each type and then connect the information via the CONTACT_ID?