Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8566379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:38:31+00:00 2026-06-11T17:38:31+00:00

I am on Android 2.3.3, API Level 10. I want to read all contacts

  • 0

I am on Android 2.3.3, API Level 10. I want to read all contacts and data associated to them, therefore e.g. all email addresses, phone numbers, custom fields…
I tried it like this:

Uri contactUri = ContactsContract.Contacts.CONTENT_URI;
Cursor contacts = managedQuery(contactUri, null, null, null, null );

contacts.moveToFirst();

do {
    for(int i=0;i<contacts.getColumnCount();i++)
    {
         System.out.println(contacts.getColumnName(i) + ": " + contacts.getString(i));
    }

    System.out.println("============\n\n");

} while (contacts.moveToNext());

contacts.close();

However this gives me only the following fields:

times_contacted: 0
contact_status: null
custom_ringtone: null
has_phone_number: 1
phonetic_name: null
phonetic_name_style: 0
contact_status_label: null
lookup: [removed]
contact_status_icon: null
last_time_contacted: 0
display_name: [removed]
sort_key_alt: [removed]
in_visible_group: 1
_id: 101
starred: 0
sort_key: [removed]
display_name_alt: [removed]
contact_presence: null
display_name_source: 40
contact_status_res_package: null
contact_chat_capability: null
contact_status_ts: null
photo_id: null
send_to_voicemail: 0

Where are the phone numbers, email addresses…? Thanks for any hint!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:38:32+00:00Added an answer on June 11, 2026 at 5:38 pm

    See Contact Contract API examples

    http://www.higherpass.com/Android/Tutorials/Working-With-Android-Contacts/

    ContentResolver cr = getContentResolver();
        Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,
                null, null, null, null);
        if (cur.getCount() > 0) {
        while (cur.moveToNext()) {
            String id = cur.getString(
                        cur.getColumnIndex(ContactsContract.Contacts._ID));
        String name = cur.getString(
                        cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
        if (Integer.parseInt(cur.getString(cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {
            //Query phone here.  Covered next
            }
            }
    }
    }
    

    Take a look at this example

    http://code.google.com/p/android-contacts-contract-example/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Android API level-8(i.e. Android 2.2 Froyo). I want to add the
I'm using Android with Api level 8 and I want to get the Address
I want my application to run with minimum api level 8...I tried with android:configChanges=orientation|keyboardHidden..In
I am developing an Android (API level 7) app in Eclipse 3.7.2. I have
API Level: 12 (Android 3.1) App Background: Through my Android app I am sending
Starting with API level 9, there's android:filterTouchesWhenObscured attribute and corresponding setFilterTouchesWhenObscured method on ViewGroup
I'm using Android and Google Maps at API level 10, and I get latitude
In Eclipse my Android SDK Manager doesn't show as far back as API level
I want to access Android API classes outside an Android project . For example
I want to find out if it is possible to create Android API's that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.