我使用以下方法在本地(ICS & JB)删除谷歌日历上的所有事件:
public void deleteAll(){
String selection = "(" + CalendarContract.Events.CALENDAR_ID + " = ?)";
String[] selectionArgs = new String[] { Integer.toString(this.calId) };
ContentResolver cr = context.getContentResolver();
int rows = cr.delete(CalendarContract.Events.CONTENT_URI, selection, selectionArgs);
Log.d(TAG, rows + " events deleted");
}
一切正常,但我收到一个烦人的警告:日历删除过多
Delete limit exceeded
There are 21 deleted items for Calendar, account
xxxxx.xxxxx@gmail.com. What would you like to do?"
Delete the items.
Undo the deletes.
Do nothing for now.
显示错误的原因是什么,有人知道避免它的方法吗?我正在使用 HTC One-X
问候 R