[英]How can I open the user's profile contact using an Intent?
I'd like to build an intent which opens the user's profile contact in the "Contacts" application. 我想建立一个意图,在“联系人”应用程序中打开用户的个人资料联系人。 I've read that the profile/me contact is always at position 0 but it doesn't work with the snippet I've built:
我了解到,个人资料/我的联系人始终位于位置0,但不适用于我构建的代码段:
new Intent(Intent.ACTION_VIEW).setData(Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, "0"))
Could any of you tell me how I can resolve this? 谁能告诉我如何解决这个问题?
尝试改用ContactsContract.Profile.CONTENT_URI
。
查看QuickSettings.java
Profile QuickSettings.java
贴的源代码,我可以使用它:
new Intent(Intent.ACTION_VIEW).setData(ContactsContract.Profile.CONTENT_URI)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.