Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中,我使用 Intent 类向联系人添加姓名、电话号码和电子邮件。我想编辑一个特定的联系人。我怎样才能获得该联系人的相应标识符?请帮我。提前致谢
尝试将您的联系人姓名的值传递给此代码:
Cursor cur = this.context.getContentResolver().query(ContactsContract.RawContacts.CONTENT_URI, null, Data.DISPLAY_NAME + " like '"yourcontactname"%'", null, null);