Reputation: 24476
How to display the Contacts by content Uri. I know the contacts content uri Contacts.CONTENT_URI
But, these content uri is differ from Version of SDK and API and also, i wan to know the content uri for all the versions. Because, i'm going to make one application like version independent of contact. Any one list out the content uri for all version of contacts.
Upvotes: 1
Views: 4573
Reputation: 1006644
There are only two content providers in the Android SDK for contacts: Contacts
and ContactsContract
. The latter is for use on Android 2.x and higher. However, each of those have multiple CONTENT_URI
values, depending upon what facets of the data you are trying to interact with.
Here is a sample project demonstrating how to choose between two of those CONTENT_URI
values via reflection in a static initializer.
Here is a sample project demonstrating how to choose between two of those CONTENT_URI
values via conditional class loading in a static initializer.
Upvotes: 2