当我查询 Events.CONTENT_URI 的内容解析器时,它正确地向我显示了未来的事件并且它们有警报。但是当我查询 Reminders.CONTENT_URI 时,它只显示已经发生的提醒。我想查找未来的事件是否有提醒,并允许用户在需要时将其删除。我该怎么做呢?我在哪里可以找到这些信息?
此处仅显示已经发生的提醒
//Get all reminders
Cursor cursor = getContentResolver().query(
Reminders.CONTENT_URI, null, null, null, null
);
//None of my future events show here even though they have reminders
while (cursor.moveToNext())
{
Log.d(TAG,
"Id: " + cursor.getInt(cursor.getColumnIndex(Reminders._ID)) +
", Minutes: " + cursor.getInt(cursor.getColumnIndex(Reminders.MINUTES)) +
", Method: " + cursor.getInt(cursor.getColumnIndex(Reminders.METHOD))
);
}
这显示了所有未来的事件(所有这些都有提醒,但它们不显示在提醒中
//Get all events
Cursor cursor = getContentResolver().query(
Events.CONTENT_URI, null, null, null, null
);
while (cursor.moveToNext())
{
//This correctly shows the future events each have an alarm (hasAlarm = 1)
Log.d(TAG,
cursor.getString(cursor.getColumnIndex(Events.TITLE)) + ","
cursor.getInt(cursor.getColumnIndex(Events.HAS_ALARM))
);
}
我如何找到(并更改)未来事件的提醒?
编辑:CalendarAlerts 也不显示未来事件的警报!未来的事件未显示在 CalendarAlerts.CONTENT_URI 中