Closed thiesw closed 3 years ago
Note: The (textual) changes in build.gradle concerning versionName and in legal.xml are done by me to recognize the changed version when installed. This should be adjusted by the maintainers to the "correct" texts, of course.
THANK YOU for making CalendarImportExport-v27tw.apk! For me, the v27tw flavor saved the day. My story:
As my first smartphone, I have been using until last month a really old Moto G4 (running Android 7). I always used the phone without a Google account, local calendar only. I sideloaded all apps, including Business Calendar 2. Last month, I moved to my new Pixel 4a running CalyxOS, and again using Business Calendar 2. For my phone move, I used Calendar Import-Export v2.6 from F-Droid to extract my local calendar from my old Moto G4. And surprise, I encounter the "old deleted events" in my .ics file = because my local calendar was never synced.
I considered a lot of different solutions. I tried a lot of ways, and did a lot of searching, and a lot of trial and error. Here is the secret sauce for my unique situation wherein I wanted to continue to use Business Calendar 2, but also get around the "deleted=1" junk in my never synced local calendar: 1) Remove Calendar Import-Export v2.6 from my old Moto G4 2) Install CalendarImportExport-v27tw.apk on my old Moto G4 3) Using CalendarImportExport-v27tw.apk, get a good export of my Moto G4 local calendar (Yay! No "deleted=1" junk!!!) 4) Get my own private CalDAV server up and running = I set up Radicale (https://radicale.org/v3.html) on my Raspberry Pi (which I use 24x7 to run Pi-Hole)
With these steps, I accomplished the following: 1) I got clean data out from my "dirty" local calendar = no "deleted=1" junk! 2) I was able to get my calendar data into my new phone. 3) My new phone now should never get into the "deleted=1" twilight zone either because: 1) The newer Android OS versions might not suffer from "deleted=1" stuff OR 2) Now that I have my own CalDAV server, I can safely sync my calendar "locally", and via syncing the "deleted=1" events go bye-bye... 4) I have a backup of my calendar on my CalDAV server, and my calendar is still "local" so-to-speak, and is still privatized as it is not getting sent somewhere else when syncing 5) I can now share my calendar with other devices (wife's phone, my computer, etc.) if I want to 6) I can still back up the calendar in my Pixel 4a using Calendar Import-Export v2.6
Yes, I tried importing my cleansed .ics file directly into my CalDAV server - this did not work well since I could not choose duplicate handling of "Don't check for duplicates at all, always insert all imported events" = I needed the power of Calendar Import-Export v2.6 to import all of my events, even the events which appear to be duplicates (which looked similar, but indeed were not exact duplicates and I wanted them!).
THANK YOU again for CalendarImportExport-v27tw.apk!
In local calenders a deleted event just gets "deleted=1" set, the vent is not removed from the database/calendar provider (see also issue #44). This upddate filters this by adding "deleted=0" to the export-queries.
Additionally the color of events is supported on export and import. The iCal property "COLOR" (RFC-7986) is used (CSS3 color name), additionally two "X-CIE-" properties (own addition with CIE = CalenderImportExport) with the full value from calendar db (ARGB value and color index). As CSS3 color name the best matching one is used (see new file ColorUtils.java).
I tested it with NextCloud, DAVx5 (you have to explicitly activate event color sync in the account settings!), on a Samsung A3 and a Pixel 4a, the internal calendar app, aCalendar+, and Etar.
Also the android SDK versions in gradle build have been updated.
For anyone needing this functionality right now, I offer the compiled APK with these changes:
https://it-tw.de/android/CalendarImportExport-v27tw.apk (I added no malicious code, but use on your own risk anyway; the APK is signed with a not listed signature at Google Play, so you'll get a warning; you will need to uninstall the previous "official" version first, because of a signature change). Note: I found out, that my compiled APK crashes on the import on Android 11, but already during filling the importable files in the drop-down. It works under Android 8 or when executing the debug-build (so undebugable error, great!). I did not change any code for this, so this seems to be an android-target-sdk related problem.