I have a raw contact ID for a contact in my application. I want to open the native contact phonebook for editing in my contact (basically the contact in edit mode in native address book). How can I do that?
Asked
Active
Viewed 132 times
2 Answers
1
What I understand from your question is that, you have a contact id you want to open that in android native address book against that id. If that is the case then below code should help you
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, String.valueOf("18"));
intent.setData(uri);
startActivity(intent);
In String.valueOf() method provide the contact id you want to open.

Abdul Waheed
- 4,540
- 6
- 35
- 58
0
Problem resolved.
I did this with below code
Intent intent = new Intent(Intent.ACTION_EDIT); intent.setData(ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, contactID)); startActivity(intent);

Amit
- 225
- 2
- 14