我想在添加新事件之前检查日历中是否存在事件:这是我添加事件的代码:
Calendar cal = Calendar.getInstance();
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("beginTime", date.getTime());
intent.putExtra("allDay", true);
intent.putExtra("rrule", "FREQ=YEARLY;COUNT=1");
intent.putExtra("endTime", date.getTime()+60*60);
intent.putExtra("title", "Blub");
intent.putExtra("description", "Bla Blu Bli");
startActivityForResult(intent, 1);
现在请指导我如何检查日历中已经存在的事件?