Is it possible to open an android contact card by contact's ID? It works with the phone-number. Here is an example, if I use
Intent i = new Intent();
i.setAction(ContactsContract.Intents.SHOW_OR_CREATE_CONTACT);
i.setData(Uri.fromParts("tel", "123456", null)); //<---- Change here from Phone to IDcontext.startActivity(i);
But I want to open this contact card by ID, for example if the phone-number from the contact would change.
On your Android phone or tablet, open the Contacts app . Tap a Contact in the list. Select an Option.
For Android: Open your contact card in the Contacts app (or launch the Phone app and tap the Contacts app near the right side of the screen), then tap the three-dot menu button in the top-right corner of the screen. Tap Share, then pick your messaging application of choice.
Open your Contacts app and tap the Options button (three dots), and select Contacts Manager. On the next screen, tap on Contacts to display from the menu. Next, if you only want contacts with a phone number, tap on Phone.
Lync 2013 for Android. The contact card displays information about people and provides several ways to communicate with someone. For example, you can send an instant message, start an audio or video call, or send an email message directly from someone's contact card.
use ACTION_VIEW and either build a contact URI using the contact ID or use the contact lookup URI if you already have it (preferred).
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, String.valueOf(contactID));
intent.setData(uri);
context.startActivity(intent);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With