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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:11:27+00:00 2026-05-28T19:11:27+00:00

In Android, when the user selects one contact using the contact picker, you get

  • 0

In Android, when the user selects one contact using the contact picker, you get only the CONTACT_ID field. But for updating some contact info, you need to edit the raw contact data. To do so, you have to know the RAW_CONTACT_ID. Is this correct so far?

So how do you get the RAW_CONTACT_ID that you need for updating data when you have only the CONTACT_ID? Like this … ?

String[] projection = new String[] { ContactsContract.RawContacts._ID };
String where = ContactsContract.RawContacts.CONTACT_ID + " = ?";
String[] selection = new String[] { String.valueOf(contactId) };
Cursor c = getContentResolver().query(ContactsContract.RawContacts.CONTENT_URI, projection, where, selection, null);

But this way you will get all the RAW_CONTACT_IDs belonging to the picked user, right? Which one is then the raw contact that I should update?

If you want to say “It’s up to you”: It’s all the same to me. I just want to put my data anywhere, in any raw contact that can hold the data.

  • 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-28T19:11:28+00:00Added an answer on May 28, 2026 at 7:11 pm

    There’s no perfect answer. But the easiest, and probably, most correct is to use the google account.

    Which you can do by selecting on the ACCOUNT_TYPE which will be “com.google” for the google account. As there can be many google accounts on the phone just choose the first one (or the one with most contacts).

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

Sidebar

Related Questions

I have a spinner, which mostly works. If a user selects one of the
I am nearing completion of a project I am working on using Android, but
I've got a common use-case wherein a user selects one item out of many
At one point in my app, the user selects an image from a Gallery
In my android application I search for a cafes first. When user select one
When my user press Enter on the virtual android user validate entry! keyboard my
Is there a way for an Android user to browse the SQLite databases on
i wonder how you can make an advanced Android User interface where you can
In order for the user to control the volume , my android application has
I am creating a matching game for Android, and when the user gets a

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.