• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Display phone no associated with a contact from the contact list?

 
Lavkush Verma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using contacts URI to fetch contacts from the contact list. I am able to fetch contact names but Not able to display the Phone No associated with that contact.
I Am using Contacts.People.DISPLAY_NAME to display the contact names but no idea about the phone no. I tried using Contacts.people.phone.number. But did not got succeed.

{ Contacts.People.DISPLAY_NAME, Contacts.People.Phones.NUMBER};

Please help me regarding this.

lk
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This part of Android tutorial has an example of how to pull contacts...
 
Lavakush Verma
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ankit !
But i am using Andorid SDK 2.1. So Contacts URI i depricated. and so i am finding problems.
Andorid 2.1 suggests to use CotactsContract.Contacts.Display_Name and to display Names but i found no way to display the phone number using the same Provider (ContactsContract)

Please help me if you can !! I am in Need
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go through this...
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic