为什么 android 中的重复事件的持续时间为 NULL?

Why duration is NULL for recurrent event in android?

我尝试实现与 android 日历事件同步的一种方式(我需要原始事件 - 而不是事件实例)。所以,我有以下查询:

String[] projection = new String[]{
                    CalendarContract.Events.DTSTART,
                    CalendarContract.Events.EVENT_TIMEZONE,
                    CalendarContract.Events.DTEND,
                    CalendarContract.Events.EVENT_END_TIMEZONE,
                    CalendarContract.Events.DURATION
            };
String selection = null;
String[] args = new String[0];
String sort = CalendarContract.Events.DTSTART + " ASC";
Cursor cursor = getContentResolver().query(CalendarContract.Events.CONTENT_URI, projection, selection, args, sort);

根据 developer docs 对于经常性事件 dtstartduration 是必需的但是当我通过 Google 日历创建事件并稍后在我的代码中接收它时我有 dtend = 0duration = null

Integer dtend = cursor.getLong(2);
String duration = cursor.getString(4);

为什么会发生?

我的原始应用程序中存在索引问题。 CalendarContract.Events.DURATION 专栏解决问题。它具有 RFC2445 格式的单个事件持续时间。我只需要解析它。