Fix Android quick actions registration - #6186
Draft
JP0P wants to merge 2 commits into
Draft
Conversation
JP0P
force-pushed
the
codex/fix-quick-actions-android
branch
2 times, most recently
from
September 1, 2026 02:17
0460d37 to
5a96011
Compare
Build Android shortcut intents from the package launch intent so dynamic registration does not depend on a foreground activity. Report any remaining registration failure without interrupting app startup.
JP0P
force-pushed
the
codex/fix-quick-actions-android
branch
from
September 1, 2026 05:32
5a96011 to
9759205
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.
Summary
currentActivity!!dependency by building shortcut intents from the package launch intentWhy
Sentry issue EDGE-REACT-GUI-4T7J has approximately 1,600 production events affecting 891 users:
currentActivity!!is the old failure point, not the fix.expo-quick-actions5.0.0 uses that Kotlin non-null assertion while constructing Android shortcut intents, so registration crashes when no Activity is available during JavaScript startup. The app caught that failure withshowError, which displayed a large red alert even though quick actions are optional.This patch uses the package launch intent, so shortcut registration does not require a foreground Activity. Unexpected registration failures are still reported to Sentry, but no longer interrupt startup.
Controlled Android A/B proof
Device: Pixel 6 Pro
18311FDEE000ASAndroid build:
CP1A.260405.005Pre-patch user-visible error:
For each run, the target APK was installed, the app was force-stopped, app data and logcat were cleared, and the app was sent Home as JavaScript initialized. Android logged
currentActivity isn't availablein both runs.2608310426083116ExpoQuickActions.setItemsrejectioncontact_supportregistered before reopendo_not_uninstallregistered before reopenPre-patch logcat:
Patched logcat, captured before returning the app to the foreground:
The patched log contained zero quick-actions rejection/NPE matches. Before reopening the app,
dumpsys shortcutalready contained both dynamic records with the same fresh timestamp:The patched lifecycle test was repeated at 50, 100, 150, and 200 ms. Every run logged that the Activity was unavailable, registered both shortcut IDs, and produced zero matching quick-actions errors.
Behavior preserved from #6001
lstrings/ CrowdinsetItemsstill runs on launch, so wording changes and additional actions replace the previous definitionsVerification
npm run lint— 0 errors (existing warnings only)npx tsc --noEmitnpm test— 99 suites, 722 tests, 107 snapshots passedexpo-quick-actions5.0.0 packageCHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Requirements
No intentional visual GUI changes. The quick-action menu remains dynamic and visible; the erroneous startup alert is removed because registration succeeds without a foreground Activity.