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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:23:19+00:00 2026-06-05T06:23:19+00:00

String exactname = Joe Blogs I’ve searched high and low of a way to

  • 0
    String exactname = "Joe Blogs"

I’ve searched high and low of a way to directly open the contact using DISPLAY_NAME not the _ID of the contact.

EDIT: Joe Blogs is definitely a unique entry.

From this answer

    Intent intent = new Intent(Intent.ACTION_VIEW);
    Uri uri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, String.valueOf(contactID));
    intent.setData(uri);
    context.startActivity(intent);

Do I have to query the ID of Joe Blogs before I can open his contact with an intent similar to the above? Or have I (hopefully) missed something?

Thanks in advance.

  • 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-05T06:23:20+00:00Added an answer on June 5, 2026 at 6:23 am

    Yes, you need to query your database with something like,

    Cursor cur = getContentResolver().query(CONTENT_URI, null, DISPLAY_NAME + "=?", new String[] { "Joe Blogs" }, null);
    

    Then retrieve the row returned by the Cursor with,

    if (!cur.moveToFirst()) {
        // Then the cursor isn't empty. Get the contact's id.
        contactId = cur.getInt(cur.getColumnIndex(CONTACT_ID));
    }
    

    This will return the contact id associated with the first record in the Cursor.

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

Sidebar

Related Questions

string name = bob; object obj = name; obj = joe; Console.WriteLine(name); I'm a
String format is (not json format): a=0PN5J17HBGZHT7JJ3X82, b=frJIUN8DYpKDtOLCwo/yzg= I want convert this string to
string[] usersToAdd = new string[] { asd, asdert, gasdff6 }; using (Entities context =
String replacement in Python is not difficult, but I want to do something special:
string to build up using keyvaluepair is like this: name1=v1&name2=v2&name3=v3 what i am doing:
String.Compare() with Hungarian CultureInfo works not correct for specific strings: if (0 == String.Compare(@ny,
I have a view tied to a strongly typed ViewModel but I'm not using
string a = sea; string b = SEA if (a == b)... How could
String baseString=POST&; String subBaseString = oauth_consumer_key=+oauth_consumer_key+&oauth_nonce=+nonce+&oauth_signature_method=+oauth_signature_method; subBaseString += &oauth_timestamp=+ oauth_timestamp+&oauth_token=+oauth_token+&oauth_version=1.0; baseString += URLEncoder.encode(baseRequest, UTF-8);
string in question: '{images:{0:<div style=\\background:red;width:250px;height:250px;display:block;position:absolute;\\></div>}}' I've tried various combinations of single and double quotes.

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.