How can I launch the 'Add Contact' activity in android

Viewed 37383

Can you please tell me how to launch the Add Contact' activity in android? Thank you.

8 Answers

This should be the snippet your are looking for:

Intent addContactIntent = new Intent(Contacts.Intents.Insert.ACTION, Contacts.People.CONTENT_URI);
addContactIntent.putExtra(Contacts.Intents.Insert.NAME, "Jean-Claude"); // an example, there is other data available
startActivity(addContactIntent)

This post may help you out or at least point you in the right direction.

Hope this helps.

Update 05/11/2015:

Per the comments, check out vickey's answer below for the appropriate solution.

Related