我创建了代码来更新联系表。我可以删除和插入AVD中联系人的数据,但是就是不能更新。
ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
String rawContactInsertIndex = (Integer.toString(ops.size()));
ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
.withSelection( Data.CONTACT_ID + "=?" , new String[] { rawContactInsertIndex })
.withValue(StructuredName.DISPLAY_NAME, firstname)
.withValue(StructuredName.FAMILY_NAME, lastname)
.withValue(StructuredName.GIVEN_NAME, firstname)
请问是什么问题啊?