From c63dfddb88e753fd5a9db2d8354aad1a9999843a Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Sun, 12 Jul 2026 12:22:06 +0200 Subject: [PATCH] feat(intent): handle ACTION_EDIT and broaden .ics MIME types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Round out the calendar-intent surface toward AOSP/Etar parity — the app already handled VIEW (date + event), INSERT, and .ics open/share, but was missing the edit action and the alternate .ics MIME labels. - ACTION_EDIT on content://com.android.calendar/events/ now opens the event in the edit form (previously only VIEW → read-only detail existed). An assistant, task app, or widget can hand an event to Calendula to edit. A bare EDIT URI with no occurrence extras falls back to the event row's own DTSTART/DTEND, mirroring the #48 view-event fallback. - ACTION_EDIT with no event id (AOSP's "edit a new event") maps to the same prefilled create form as ACTION_INSERT. - The .ics VIEW/SEND filters now also accept text/x-vcalendar (vCalendar 1.0 / .vcs) and application/ics — the alternate labels the same calendar data arrives under from some file/mail apps (matches Etar's ImportActivity). Deliberately excluded: webcal:// / http(s) remote-calendar subscription (needs INTERNET, which the app doesn't have) and the Google-web-link handler (Google-specific + network). Co-Authored-By: Claude Opus 4.8 (1M context) --- app/src/main/AndroidManifest.xml | 36 +++++++++++-- .../jeanlucmakiola/calendula/MainActivity.kt | 50 +++++++++++++++++-- .../calendula/ui/CalendarHost.kt | 16 ++++++ .../jeanlucmakiola/calendula/ui/RootScreen.kt | 4 ++ .../calendula/ui/edit/EventEditViewModel.kt | 17 +++++-- 5 files changed, 109 insertions(+), 14 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 47866af..930ab70 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -97,32 +97,58 @@ - + - - + + + + + - + + + + (MainActivity.insertFormOrNull, issue #30). ACTION_EDIT on the + dir mime is AOSP's "edit a new event" — i.e. create — so it maps + to the same prefilled create form. --> + + + + + + + +