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

后端 未结 8 651
感情败类
感情败类 2020-11-30 00:15

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

8条回答
  •  悲哀的现实
    2020-11-30 00:18

    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)
    

提交回复
热议问题