feat(app): share an image into Freegle to start an Offer (Android)#758
Closed
edwh wants to merge 1 commit into
Closed
feat(app): share an image into Freegle to start an Offer (Android)#758edwh wants to merge 1 commit into
edwh wants to merge 1 commit into
Conversation
Adds an Android "Share -> Freegle" target: share a photo from the gallery, camera or any other app straight into a new OFFER with the image pre-attached, instead of having to open the app and re-pick the photo. - AndroidManifest: ACTION_SEND / ACTION_SEND_MULTIPLE image/* intent-filters on MainActivity. - MainActivity: copies the shared image(s) from the intent-scoped content:// Uri into the app cache and exposes them to the WebView via a small window.FreegleShare JS bridge (consume()). - stores/mobile: pulls shared images at startup (cold share) and on resume (warm share), converts the cache paths with Capacitor.convertFileSrc, and routes into /give/mobile/photos with them queued. - PhotoUploader: exposes processPhoto() so a shared photo runs the same quality-check + tus-upload path as the camera/gallery flows. - give/mobile/photos: on mount, attaches any queued shared image(s). iOS Share Extension to follow (needs an App Group + provisioning changes). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for golden-caramel-d2c3a7 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
Author
|
Companion iOS PR (stacked on this one): #759 — adds the iOS share-sheet extension, dark/flag-gated. Both PRs are in this same repo ( |
Member
Author
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.
What
Adds an Android "Share → Freegle" target. From the gallery, camera, or any
other app's share sheet, the user can send a photo straight into a new OFFER
with the image already attached — no need to open the app and re-pick it.
This is the Android half of the Share-into-Freegle feature. The iOS Share
Extension follows in a separate PR (it needs an App Group + provisioning-profile
changes, so it's staged on its own to avoid touching production signing here).
How
ACTION_SEND/ACTION_SEND_MULTIPLEimage/*intent-filters on
MainActivity.onCreate/onNewIntent, copies the sharedimage(s) from the intent-scoped
content://Uri into the app cache (the Uripermission doesn't outlive the intent) and exposes them to the WebView via a
tiny
window.FreegleShareJS bridge (consume()returns the file paths andclears the queue).
initShareIntentpulls shared images at startup (coldshare) and on
resume(warm share), converts the cache paths withCapacitor.convertFileSrc, queues them inpendingSharedImages, and routesto
/give/mobile/photos.defineExpose({ processPhoto })so a shared photoruns the same quality-check + tus-upload path as the camera/gallery flows.
then clears the queue.
Risk / testing
unless the native
FreegleSharebridge is present (Android app only).and on-device share test.
🤖 Generated with Claude Code