calendarcontract

Query of “all_day” events using CalendarContract.Instances results in wrong time zone

五迷三道 提交于 2019-12-12 10:42:41
问题 I'm using CalendarContract.Instances to get a set of calendar events. In general my queries work fine. However, the begin and end times for events in the "holidays" calendar come back in a wrong time zone. Events in one of my personal calendars come with correct times. For example: New Year's day "begins" at 04:00 PM, 31 Dec 2014. where as Opera "begins" at 02:00 PM, 11 Jan 2015. I'm using exactly the same code to display both: SimpleDateFormat formatter = new SimpleDateFormat ("hh:mm a, d

Why duration is NULL for recurrent event in android?

倾然丶 夕夏残阳落幕 提交于 2019-12-02 05:00:17
问题 I try to implement one way synchronization with android calendar events (I need original events - not event instances). So, I have the following query: 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

Why duration is NULL for recurrent event in android?

[亡魂溺海] 提交于 2019-12-02 02:33:44
I try to implement one way synchronization with android calendar events (I need original events - not event instances). So, I have the following query: 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);

Adding Events for all days between start date and end date in google calendar Android

亡梦爱人 提交于 2019-12-01 15:50:27
问题 Adding Events for all days between start date and end date in google calendar Android. i want remainder every 3 months till end date. This is my function public void addEvent1(Context ctx, String title){ SimpleDateFormat df2 = new SimpleDateFormat("dd/MM/yyyy"); SimpleDateFormat df3 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", java.util.Locale.getDefault()); Date Startdate = null; Date Enddate =null; String dtStart = date.getText().toString(); try { Startdate = df2.parse(dtStart); Enddate =