Skip to content

feat(app): share an image into Freegle to start an Offer (Android)#758

Closed
edwh wants to merge 1 commit into
masterfrom
feat/share-into-freegle
Closed

feat(app): share an image into Freegle to start an Offer (Android)#758
edwh wants to merge 1 commit into
masterfrom
feat/share-into-freegle

Conversation

@edwh

@edwh edwh commented Jun 14, 2026

Copy link
Copy Markdown
Member

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

  • AndroidManifestACTION_SEND / ACTION_SEND_MULTIPLE image/*
    intent-filters on MainActivity.
  • MainActivity.java — on onCreate/onNewIntent, copies the shared
    image(s) from the intent-scoped content:// Uri into the app cache (the Uri
    permission doesn't outlive the intent) and exposes them to the WebView via a
    tiny window.FreegleShare JS bridge (consume() returns the file paths and
    clears the queue).
  • stores/mobile.jsinitShareIntent pulls shared images at startup (cold
    share) and on resume (warm share), converts the cache paths with
    Capacitor.convertFileSrc, queues them in pendingSharedImages, and routes
    to /give/mobile/photos.
  • PhotoUploader.vuedefineExpose({ processPhoto }) so a shared photo
    runs the same quality-check + tus-upload path as the camera/gallery flows.
  • give/mobile/photos.vue — on mount, attaches any queued shared image(s),
    then clears the queue.

Risk / testing

  • Pure-additive: web behaviour and existing camera/gallery flows are unchanged
    unless the native FreegleShare bridge is present (Android app only).
  • Native (manifest + Java) can't be built locally; verified via CI Android build
    and on-device share test.
  • No new dependencies.

🤖 Generated with Claude Code

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

netlify Bot commented Jun 14, 2026

Copy link
Copy Markdown

Deploy Preview for golden-caramel-d2c3a7 ready!

Name Link
🔨 Latest commit 5774ca9
🔍 Latest deploy log https://app.netlify.com/projects/golden-caramel-d2c3a7/deploys/6a2f0d19ba33ae0008922f52
😎 Deploy Preview https://deploy-preview-758--golden-caramel-d2c3a7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@edwh

edwh commented Jun 14, 2026

Copy link
Copy Markdown
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 (Freegle/Iznik); the iOS Share Extension is authored directly under iznik-nuxt3/ios, so no second-repo (e.g. cap7 plugin) change is involved. Merge this Android PR first; #759's base then retargets to master.

@edwh

edwh commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

Superseded by #766, which consolidates the native-app feature PRs (#756 haptics, #757 app-icon shortcuts, #758 share-into-Freegle Android, #759 share-into-Freegle iOS) into a single PR rebased onto current master. Branch kept (not deleted) in case it's needed.

@edwh edwh closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: Passed CI build passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants