Share note via system share sheet instead of custom app grid - #1848
Open
joashrajin wants to merge 1 commit into
Open
Share note via system share sheet instead of custom app grid#1848joashrajin wants to merge 1 commit into
joashrajin wants to merge 1 commit into
Conversation
The share bottom sheet built its own app grid from PackageManager.queryIntentActivities(), which is subject to package visibility filtering on Android 11+. Since the manifest only declares https VIEW intents in <queries>, most share targets (Gmail, WhatsApp, etc.) were invisible and missing from the grid. Replace the grid with a Share button that launches the system share sheet via ShareCompat, which is not affected by visibility filtering and always lists every app that can handle the note text. Fixes #1578
Collaborator
Generated by 🚫 Danger |
Collaborator
|
📲 You can test the changes from this Pull Request in Simplenote Android by scanning the QR code below to install the corresponding build.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes missing share targets on Android 11+ by removing the custom “share app grid” (which is affected by package visibility filtering) and routing sharing through the Android system share sheet instead, while keeping Simplenote-specific share actions (Collaborate / Publish / WordPress Post) intact.
Changes:
- Replaced the custom share-target grid with a Share action that launches the system chooser via
ShareCompat. - Removed now-unused share-grid UI/resources (
ShareButtonAdapter,IconResizer, andshare_button_item.xml). - Added a release note entry documenting the fix for issue #1578.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Simplenote/src/main/res/layout/share_button_item.xml | Removed obsolete layout previously used for the custom share-target grid. |
| Simplenote/src/main/res/layout/bottom_sheet_share.xml | Replaced the RecyclerView-based app grid with a new “Share” button in the bottom sheet. |
| Simplenote/src/main/res/drawable/ic_share_other_48dp.xml | Added icon for the new “Share” action in the bottom sheet. |
| Simplenote/src/main/java/com/automattic/simplenote/utils/ShareButtonAdapter.java | Removed adapter for the deprecated custom share-target grid. |
| Simplenote/src/main/java/com/automattic/simplenote/utils/IconResizer.java | Removed icon resizing utility previously used by the custom grid. |
| Simplenote/src/main/java/com/automattic/simplenote/ShareBottomSheetDialog.java | Wired the new “Share” button callback (onShareOtherClicked) and removed grid-related logic. |
| Simplenote/src/main/java/com/automattic/simplenote/NoteEditorFragment.java | Implemented onShareOtherClicked() to launch the system share sheet via existing showShare(). |
| RELEASE-NOTES.txt | Added release note entry for the share sheet fix (#1578). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
joashrajin
marked this pull request as ready for review
July 23, 2026 12:20
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.
Fix
Fixes #1578
Problem
The note share bottom sheet builds its own grid of share-target apps using
PackageManager.queryIntentActivities()forACTION_SEND/text/plain. Since Android 11, that query is subject to package visibility filtering: an app targeting API 30+ can only see packages it declares in a<queries>manifest block. Our manifest only declares httpsVIEWintents (browsers), so the grid was reduced to browsers plus the handful of apps that are automatically visible (Bluetooth, Drive, Nearby Share, WordPress, Simplenote itself). Gmail, WhatsApp, Twitter, etc. never appeared.Solution
Replace the app grid with a Share button in the custom bottom sheet that launches the system share sheet via
ShareCompat(same pattern already used byNoteEditorFragment#showShare). The system chooser is not affected by visibility filtering, so it always lists every installed app that can handle the note text — including everything the old grid showed (Bluetooth, Drive, Nearby Share, WordPress, …).The Simplenote-specific actions (Collaborate, Publish/Unpublish, WordPress Post) are unchanged.
Also removes the now-unused
ShareButtonAdapter,IconResizer, andshare_button_item.xml.Test
Review
(fill in)
Release
These changes do not require release notes beyond the RELEASE-NOTES.txt entry added here.