gpt4 book ai didi

android 4.0.3 ACTION_INSERT_OR_EDIT Intent 不工作

转载 作者:可可西里 更新时间:2023-11-01 19:08:17 31 4
gpt4 key购买 nike

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

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

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

谢谢

最佳答案

你错过了这一行:

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

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

关于android 4.0.3 ACTION_INSERT_OR_EDIT Intent 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8555455/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com