Returning contact details from ContactsContract


Last Updated:

  1. Broto25

    Broto25 Member This Topic's Starter

    Joined:
    Dec 7, 2009
    Messages:
    6
    Likes Received:
    0
    Hi everybody,

    I'm having a small issue trying to get my contacts' details using the new API 5 (2.0)
    What i'm doing is :

    Intent i = new Intent(Intent.ACTION_PICK, android.provider.ContactsContract.CommonDataKinds.Phone.CONTENT_URI);

    startActivityForResult(i,1);

    This part of the code is going alright, it shows all my contacts...The problem is with the result of that.
    What i get is a String like "content://com.android.contacts/data/1"

    How should i get the personal information of the contact (like display_name, phone number) from this DB entry??

    Thanks!
     

    Advertisement
  2. Broto25

    Broto25 Member This Topic's Starter

    Joined:
    Dec 7, 2009
    Messages:
    6
    Likes Received:
    0
    anyone???
     
  3. MountainX

    MountainX Well-Known Member

    Joined:
    Nov 27, 2009
    Messages:
    140
    Likes Received:
    3
    Did you ever find help on using the new ContactsContract class? Let me know if you found any good tutorials.
     
  4. Broto25

    Broto25 Member This Topic's Starter

    Joined:
    Dec 7, 2009
    Messages:
    6
    Likes Received:
    0
    try to google key words like, ContractContacts, contacts android 2.0, all the things i know are coming from this kind of search... the new API is not really well documented, but you can gather some helpful stuff in the other forums.
    I
     
  5. MountainX

    MountainX Well-Known Member

    Joined:
    Nov 27, 2009
    Messages:
    140
    Likes Received:
    3
  6. revolu

    revolu New Member

    Joined:
    Mar 18, 2011
    Messages:
    1
    Likes Received:
    0

Share This Page

Loading...