In Android API level 8, What's "person" column in "content://sms/inbox" matching to?
I query at Uri: "content://sms/inbox" for reading inbox sms. Then I got these two marjor columns returned (there're other columns which not related to my question so i just skip them): *address - the from-person's phone number *person - an id value. I thought it should map to column *id in Uri "ContactsContract.Contacts.CONTENT_URI"
I then query Uri: ContactsContract.Contacts.CONTENT_URI by condition: "id=person", hope to get the开发者_StackOverflow社区 contact's display name, for some person, it works , but for many it doesn't - I then dig deeper and found there're a column "raw_contact_id" in Contacts Uri, and for those unmapped person value, it's actually mapping to this "raw_contact_id" value.
I wonder why would this happen? Shouldn't the id be unique for contact finding? Or did i miss something to make a full query to get display name by this *person value ??
Person column is the _id does not account for phone sync issues. There are multiple accounts contacts you have to make sure you are selecting the correct account type and then query Contacts.Contract for the given value. You may also try lookup_key to give you more info. See http://developer.android.com/reference/android/provider/ContactsContract.html for info.
精彩评论