Skip to content

feat(android): receive text and files from the share sheet - #1666

Merged
houko merged 2 commits into
nsgo-dev:mainfrom
houko:feat/android-receive-shares-655
Nov 21, 2026
Merged

houko merged 2 commits into
nsgo-dev:mainfrom
houko:feat/android-receive-shares-655

Conversation

@houko

@houko houko commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Android apps can declare the MIME types they receive from the share sheet in android.share_types and handle each delivery with mobile.OnShared. The callback receives text and cache-backed copies of granted files, including shares that launch the app. nsgotest.App.ReceiveShare exercises the same callback in tests.

Refs #655. The iOS share extension is tracked in the roadmap.

Targets

  • Shared code and packaging
  • Android

Screenshots

None

Verification

  • Pixel 3 XL on Android 12 received text on cold and warm launches, and single- and multiple-file shares while already running. A multiple-file share also launched the receiver. The app read both files and verified the bytes. A declared URL scheme still resolved, and an undeclared share MIME type was filtered.
  • TestReceiveShareKeepsBatchesUntilAHandlerRegisters passed headless and on the Pixel under go tool nsgo test -target android.
  • Focused regressions passed for YAML validation, APK and App Bundle manifests, event kind names, Go/Java protocol parity, HarmonyOS coverage, GPU fallback, Java canvas caching, package layering, the public API, and the skill references.
  • go tool nsgo check passed for Android arm64 and x64, macOS arm64, Windows x64, Linux x64, iOS simulator, Web, and HarmonyOS.
  • The Android DEX and JAR were rebuilt with the share event after the existing save-preflight event. git diff --check passed.

Checklist

  • Conventional Commit title
  • Updated documentation and Unreleased changelog

@github-actions github-actions Bot added enhancement New feature or request size/L documentation Improvements or additions to documentation Android core cli conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/android-receive-shares-655 branch from 230fc4b to ae2c13e Compare November 21, 2026 15:00
@github-actions github-actions Bot added conflict Conflicts with the base branch; resolve it first and removed conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/android-receive-shares-655 branch from ae2c13e to 31f805f Compare November 21, 2026 17:49
@houko
houko force-pushed the feat/android-receive-shares-655 branch from 31f805f to 6a90cdf Compare November 21, 2026 19:43
@houko
houko merged commit a7a2ff3 into nsgo-dev:main Nov 21, 2026
5 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android cli conflict Conflicts with the base branch; resolve it first core documentation Improvements or additions to documentation enhancement New feature or request size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant