offline-calendar icon indicating copy to clipboard operation
offline-calendar copied to clipboard

Calendar app does not allow "Change only this event" for events from calendars with CalendarContract.ACCOUNT_TYPE_LOCAL

Open dschuermann opened this issue 11 years ago • 11 comments

Bug report copied here from upstream AOSP: http://code.google.com/p/android/issues/detail?id=58779

As can be seen in [1] Android's default calendar app does not allow to change single instances of an event when the event is not synced (_SYNC_ID is empty). As local calendars created by CalendarContract.ACCOUNT_TYPE_LOCAL are never synchronized, the option will never be available.

Fix: Don't check for syncId for events from calendars with ACCOUNT_TYPE_LOCAL.

Bug report from my app Offline Calendar: dschuermann/offline-calendar#14

[1] method displayEditWhichDialog() at line 715 at https://android.googlesource.com/platform/packages/apps/Calendar/+/master/src/com/android/calendar/event/EditEventFragment.java

online calendar offline calendar

dschuermann avatar Aug 09 '13 09:08 dschuermann

Is there a way to make the events appear as if they synced? Would making a fake sync adapter work? At the moment we don't sync, but perhaps going through each event and setting the _SYNC_ID as an "offline sync adapter" would. Though the sync adapter documentation looks terrifying

bcaller avatar Jul 19 '14 19:07 bcaller

The app named aCalendar available at https://play.google.com/store/apps/details?id=org.withouthat.acalendar is able to edit/delete individual events within repeated series in offline calendars. How are they able to do it?

Gitoffthelawn avatar Sep 03 '15 07:09 Gitoffthelawn

@Gitoffthelawn aCalendar is closed source as far as I know, so I can't find out how they do this. At least not easily.

dschuermann avatar Sep 03 '15 08:09 dschuermann

@dschuermann AFAIK, it is closed source. Are you able to confirm my findings that it is able to do this?

Maybe you will have an "Aha!" moment if/when you see it working in their app!

Gitoffthelawn avatar Sep 03 '15 08:09 Gitoffthelawn

@Gitoffthelawn I tried aCalendar with offline Calendars and it didn't let me edit single instances. (nameless rom, android 5.1.1)

I tried changing the calendar-storage sqlite file by hand, so setting the _SYNC_ID to "LOCAL" with sqlbrowser but it seemed to have no effect.

@dschuermann Im confused about this issue, since you previously state that you cant fix it? All I see is either a custom sync adapter or some fiddling with the calendar file itself, which seems to have no effect.

shawniac avatar Oct 22 '15 09:10 shawniac

@Shawniac Interesting. I tested using KitKat, so perhaps that is the difference. I remember it definitely working when testing with aCalendar. Perhaps something changed in Lollipop.

Gitoffthelawn avatar Oct 31 '15 02:10 Gitoffthelawn

Just want to second that this would be an excellent feature to add!

dylanrees avatar Oct 13 '16 23:10 dylanrees

Tested on android 6.0.1 and 7.1.1: Manually setting "_sync_id" in table calendars to any value (e.g. using aSQL_Manager) will allow editing of single, all or unfinished calendar_items.

"_sync_id" seems also necessary for syncing to local pc using the famous "myphone explorer".

So: Please generate and store a random _sync_id when creating a local calendar...

guest4711 avatar Apr 10 '17 12:04 guest4711

I also think this something on the side of offline Calendar. We need a Sync_id otherwise the delete logic doesn't work. The problem is that we do not really delete individual entries but generate a new event with the same mSyncId which lists the deleted entries! Look at: https://github.com/xsoh/Etar-Calendar/blob/master/src/com/android/calendar/DeleteEventHelper.java#L375

@dschuermann Is it possible to generate and store a random _sync_id on your side ? I don't know what we can do on our side.

Gitsaibot avatar Aug 18 '18 16:08 Gitsaibot

Any progress @Gitsaibot ?

davidhedlund avatar Mar 21 '19 17:03 davidhedlund

I am also definitely interested by this feature/bug.

I have been using Offline Calendar fo several Years now and not being able to delete a single entry in a series is pretty cumbersome. So far I am working around the issue by creating a new entry that, for say an appointment in a series, says 'No appointment' and uses the same hour/timeslot.

Thanks for looking into this!

Edit: I am using Lineage 14.1/Android 7.1.2 on a Google Nexus 5 with Offline Calendar 1.8

vrubiolo avatar May 21 '19 00:05 vrubiolo