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:
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)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.