SufficientlySecure / offline-calendar

Archived
GNU General Public License v3.0
58 stars 20 forks source link

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

Open dschuermann opened 11 years ago

dschuermann commented 11 years ago

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

bcaller commented 10 years ago

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

Gitoffthelawn commented 9 years ago

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?

dschuermann commented 9 years ago

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

Gitoffthelawn commented 9 years ago

@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!

shawniac commented 9 years ago

@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.

Gitoffthelawn commented 9 years ago

@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.

dylanrees commented 8 years ago

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

guest4711 commented 7 years ago

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...

Gitsaibot commented 6 years ago

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.

davidhedlund commented 5 years ago

Any progress @Gitsaibot ?

vrubiolo commented 5 years ago

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