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 6996617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:10:50+00:00 2026-05-27T20:10:50+00:00

i am querying contacts through private Cursor cursor; private static final String SORT_ORDER =

  • 0

i am querying contacts through

private Cursor cursor;
private static final String SORT_ORDER = ContactsContract.Contacts.DISPLAY_NAME + " ASC ";

String[]   myProjection = new String[] { ContactsContract.Contacts._ID, 
            ContactsContract.Contacts.DISPLAY_NAME, 
            ContactsContract.Contacts.PHOTO_ID,
            ContactsContract.Contacts.HAS_PHONE_NUMBER,
            ContactsContract.Contacts.STARRED};

cursor = managedQuery(ContactsContract.Contacts.CONTENT_URI, myProjection, null, null, SORT_ORDER);

and its giving me all contacts details.But my issue is with the duplicate contact details.
Like i am getting a few contacts details multiple times. i think one is from my phone contact another is from facebook contact and from other sites as well.How can i show only one contact of same person in my details.

i have read in some blogs stating a different projection like

ContactsContract.Contacts.Data.RAW_CONTACT_ID

and different URI

RawContacts.CONTENT_URI

Can anyone suggest me what is the diff between the two URI.i need to query id,name,photo,phone number,email,starred.

Thanks

  • 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-05-27T20:10:51+00:00Added an answer on May 27, 2026 at 8:10 pm

    To understand the difference you can follow this page:
    http://developer.android.com/reference/android/provider/ContactsContract.Intents.Insert.html

    In nutshell:
    A contact (identified by CONTACT_ID) is a virtual, combined contact. This is what the 2.0 Contacts app shows, where you might have information pulled from two different Google accounts /and/ your Facebook account.
    A given contact contains one or more ‘raw contacts’ (identified by RAW_CONTACT_ID), which are the actual individual records from the different accounts.

    Hope this clears your confusion.

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

Sidebar

Related Questions

I have a problem in querying phonebook contacts. What I need to do is
Anyone have any luck querying for a contacts nickname given a phone number or
I am querying the ContactsContract.Data table in Android using a ListView to display the
in the Contacts API, there is a difference between querying a contact in the
When querying for large ammount of data through WMI (say the windows events log
Is querying for URLs present on ports other than 80 allowed with urlfetch() I
When querying the database with: @robots = Robot.all(:condition => [:a => 'b'], :limit =>
I am querying an SQLite database using LINQ to NHibernate. Person is an entity
I am directly querying the back-end MS SQL Server for a software package. The
I am querying for the current page file usage on Windows-based systems. This is

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.