Skip to content Skip to sidebar Skip to footer

How To Query Contactscontract.commondatakinds.phone On Android?

I'm trying to build a conversation list for SMS messages. Therefore I'm reading 'content://sms/conversations' and read the first few messages of each conversation to find the comm

Solution 1:

You should have a look at the recommended ContactsContract.PhoneLookup provider

A table that represents the result of looking up a phone number, for example for caller ID. To perform a lookup you must append the number you want to find to CONTENT_FILTER_URI. This query is highly optimized.

Uriuri= Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber));
resolver.query(uri, newString[]{PhoneLookup.DISPLAY_NAME,...

Post a Comment for "How To Query Contactscontract.commondatakinds.phone On Android?"