14

当我尝试像这样使用这个意图时......

Intent i = new Intent(Intent.ACTION_INSERT_OR_EDIT);
i.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
startActivityForResult(i,INSERT_CONTACT);

它会加载联系人列表,然后在选择或创建联系人后我不会返回我的应用程序。我检查了日志,没有什么特别突出的。ICS 中是否有新的意图操作?

谢谢

4

1 回答 1

1

您缺少这一行:

intent.putExtra(ContactsContract.Intents.Insert.NAME, "Larry Page");

有效的“字段” :http : //developer.android.com/reference/android/provider/ContactsContract.Intents.Insert.html

于 2012-06-11T10:04:51.467 回答