feat: add share image to diary entry #340#351
Open
wellorbetter wants to merge 1 commit intoDemizo:masterfrom
Open
feat: add share image to diary entry #340#351wellorbetter wants to merge 1 commit intoDemizo:masterfrom
wellorbetter wants to merge 1 commit intoDemizo:masterfrom
Conversation
25abcbc to
2a30b45
Compare
wellorbetter
commented
Apr 6, 2026
Author
wellorbetter
left a comment
There was a problem hiding this comment.
This PR implements receive-share for images (issue #340) — users can share images from gallery/other apps directly into a diary entry.
How it works:
- Android intent-filter registers the app as a share target for image/*
- MainActivity handles both cold-start (stores URIs until Flutter is ready) and warm-start (pushes URIs via MethodChannel stream)
- ShareIntentService bridges Android → Flutter, reads content:// URIs and compresses images
- ShareToEntryPage lets the user pick today or a custom date, then saves via the existing EntryImagesProvider — no changes to
existing save logic
What was changed:
- AndroidManifest.xml — added intent-filter (2 actions)
- MainActivity.kt — added MethodChannel + intent handling
- 3 new Flutter files: share_intent_service.dart, share_to_entry_page.dart, share_image_preview.dart
- Minimal changes to home_page.dart, mobile_scaffold.dart, launch_page.dart, main.dart, launch_intent.dart (routing only)
- l10n: all 31 languages translated
2a30b45 to
4ba126c
Compare
Add 'Share to Daily You' to the Android share sheet. When triggered, a new page opens allowing the user to add the shared image(s) to a diary entry — either today's or a date they pick. - AndroidManifest: intent-filter for ACTION_SEND / ACTION_SEND_MULTIPLE - MainActivity: MethodChannel bridge for content:// URI reading - ShareIntentService: cold-start pull + warm-start push handling - ShareToEntryPage: date selection UI + image compression + save - ShareImagePreview: content:// aware image preview widget - LaunchIntent: new ShareFilesIntent variant - English l10n keys only (translations via Weblate) Closes Demizo#340
4ba126c to
fe56f9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add "Share to Daily You" to the Android share sheet. When triggered, a new page opens allowing the user to add the shared image to a diary entry — either today's or a date they pick.
Closes #340
Reasoning
Used an Android
intent-filterwithACTION_SEND+image/*MIME type to receive shares. AMethodChannelinMainActivitypasses the content URI to Flutter.
ShareIntentServiceconverts the URI to a local file path, andShareToEntryPagehandles UIfor date selection and saving to the entry via the existing
EntriesProvider/EntryImagesProviderpattern.Testing
Type of change
❌ Bug fix
✅ New feature (A non-breaking change that adds functionality)
❌ Breaking change
❌ Refactor
❌ Performance
❌ Style
❌ Docs
❌ Chore