0
我插入一個聯繫人。如何獲得行聯繫人ID?如何在插入後獲取行聯繫人ID?
//insert a contact
ops.add(ContentProviderOperation
.newInsert(ContactsContract.RawContacts.CONTENT_URI)
.withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, null)
.withValue(ContactsContract.RawContacts.ACCOUNT_NAME, null)
.build());
// insert email, phone, structuredpostal and other
// things of the contact using withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
cr.applyBatch(ContactsContract.AUTHORITY, ops);