I need to get all contacts on a phone and their associated phone numbers, therefore I need to join some of the contact tables that Android stores in its internal contacts.db. I think just joining the data by an SQL statement would be much easier than going with all that content provider stuff, or is there any way to join data on those? Also, if I write an SQL statement, are there any constants for the table names and fields, so that I can keep the query at least a little bit generic, so it won't break on the next Android update, in case they change a table name? Thanks for any hint!
Asked
Active
Viewed 675 times
1 Answers
0
You could write your own content provider to do the join, but there you would use your own SQL query anyway.
The built-in contact providers have several documented column names.
The table names appear to be an implementation detail, but if they ever change, it's likely that the semantics will change too, so your custom queries would break anyway.