Reputation: 61
I am new to android and creating an application to print phone nos of contacts. If a take the Uri as
Uri u=Uri.parse("content://contacts/people");
I am getting error in
ContactsContract.Contacts.HAS_PHONE_NUMBER
field. If i try to get its index it comes -1.
If a use Uri
Uri u=ContactsContract.Contacts.CONTENT_URI
I am able to get the above field. Is there any difference between these two uri's.
thanks tejinder
Upvotes: 0
Views: 189
Reputation: 1006984
Is there any difference between these two uri's.
Absolutely. content://contacts/people
is the old Contacts
provider, not ContactsContract
. Unless you are supporting Android 1.x devices, please use ContactsContract
.
Upvotes: 1