1. Check out our companion app, Forums for Android! Download from Google Play

Returning contact details from ContactsContract

Discussion in 'Application Development' started by Broto25, Dec 7, 2009.

  1. Broto25

    Broto25 Member
    Thread Starter
    5

    Dec 7, 2009
    6
    0
    5
    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
    Thread Starter
    5

    Dec 7, 2009
    6
    0
    5
    anyone???
     
  3. MountainX

    MountainX Well-Known Member
    36

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

    Broto25 Member
    Thread Starter
    5

    Dec 7, 2009
    6
    0
    5
    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
    36

    Nov 27, 2009
    140
    3
    36
  6. revolu

    revolu New Member
    5

    Mar 18, 2011
    1
    0
    5

Share This Page

Loading...