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);
定期的なイベントの開発者ドキュメントによるdtstart
とduration
、必要ですが、Googleカレンダーを介してイベントを作成し、後でコードでそれを受け取るとdtend = 0
、duration = null
.
Integer dtend = cursor.getLong(2);
String duration = cursor.getString(4);
なぜそれが起こるのですか?