kjdkfjsdo8
kjdkfjsdo8

Reputation: 107

Android open Contacts app (not choose a contact)

I want to give the user possibility to open Contacts app from my app, so he can edit them, export etc.
What I DON'T WANT is a contact picker where the user selects a contact. I need only to somehow open the Contacts app from my app.
How Can I do it ? Intent ?

Upvotes: 4

Views: 2384

Answers (2)

Mithun Sarker
Mithun Sarker

Reputation: 4023

The following snippet will do what you want .

    Intent intent = new Intent(Intent.ACTION_VIEW, ContactsContract.Contacts.CONTENT_URI);
    startActivity(intent);

Upvotes: 7

Akshar Patel
Akshar Patel

Reputation: 9378

This should work as expected.

Intent intent = new Intent();
intent.setComponent(new ComponentName(
     "com.android.contacts"
    ,"com.android.contacts.DialtactsContactsEntryActivity");
startActivity(intent)

Upvotes: 0

Related Questions