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);