2

I know this has been asked a couple of times, but there doesn't seem to be a clear answer. I am trying to delete a single instance of a recurring event (which I created in the first place). Although it's not clear which approach to take to do this, another SO post makes sense - Delete only one instance of a recurring event from my Android calendar - update the exclusion date, EXDATE.

I have tried this with both UTC time and default timezone - in both cases the return value is 1, indicating 1 row updated, but the event instance does not disappear.

            ContentValues event = new ContentValues();
                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd'T'hhmmss'Z'");
                sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
                String str = sdf.format(beginTime.getTime());
                //TimeZone timeZone = TimeZone.getDefault();
                //event.put("eventTimezone", timeZone.getID());
                event.put("exdate", str);

                int numrows = getContentResolver().update(eventUri, event, "_id=? and calendar_id=?", new String[] {currentAppt.getCaleventid(), currentAppt.getCalendarid()});
                Log.d(TAG, numrows + " rows updated - date was " + str);

I know the calendar id and event id are correct as I can delete all the events without a problem. The return count of 1 would also indicate it is finding the row to update.

What am I doing wrong?

Community
  • 1
  • 1
Marion McKelvie
  • 424
  • 1
  • 5
  • 15
  • Please refer http://stackoverflow.com/questions/10462095/delete-only-one-instance-of-a-recurring-event-from-my-android-calendar – user2504840 Nov 28 '14 at 08:30

0 Answers0