Android:如何使用contentResolver仅更新多个记录中的一列

bla*_*yre 6 android android-contentresolver

如何使用内容解析器更新多个记录的一个特定列?

update(Uri uri, ContentValues values, String where, String[] selectionArgs) 
Run Code Online (Sandbox Code Playgroud)

上面的函数是否要求我重写contentValues对象中每条记录的所有值?当我使用这个函数只有一个值,如:

ContentValues value = new ContentValues();      
value.put (Voicemails.IS_READ, 1 );//mark as read

int iRowsUpdated=contentResolver.update(uri, value, null, null);
Run Code Online (Sandbox Code Playgroud)

然后我得到异常"无法更新URI:content://com.android.voicemail/voicemail?...不支持批量更新",这可能是因为"where"设置为null;

一个教程提到"要批量更新一组记录到Content provider,请调用ContentResolver.update()方法,并使用要更改的列和值."

但是我无法做到这一点......我仍然不知道如何只更新所有记录的一列,基本上我需要将阅读的语音邮件标记为已读.