Fix ActivityNotFoundException on Android 11+ with browser query intents#24
Merged
Subterrane merged 2 commits intodevelopfrom Apr 2, 2026
Merged
Fix ActivityNotFoundException on Android 11+ with browser query intents#24Subterrane merged 2 commits intodevelopfrom
Subterrane merged 2 commits intodevelopfrom
Conversation
…owser query intents Android 11 (API 30) introduced package visibility restrictions that cause PackageManager.queryIntentActivities() to return an empty list unless the app declares <queries> for the intents it needs. AppAuth uses this to discover available browsers, so without the declaration the sign-in flow crashes with ActivityNotFoundException. This adds <queries> for VIEW intents with http/https schemes to the library manifest (automatically merged into consumer apps). Also bumps compileSdkVersion to 30 and AGP to 4.1.3 (both required for <queries> element support), and updates the Gradle wrapper to 6.7.1. Supersedes #22. [no-ado]
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
<queries>element to the library manifest declaringVIEWintents forhttpandhttpsschemes, so AppAuth can discover available browsers on Android 11+ (API 30)compileSdkVersionandtargetSdkVersionto 30 across all modules (required for<queries>support)<queries>)Context
This supersedes PR #22, which correctly identified the root cause (Android 11 package visibility restrictions causing
ActivityNotFoundException) but could not work because:compileSdkVersionremained at 29 —<queries>requires SDK 30+<queries><queries>block was duplicated in demo app manifests (unnecessary since the library manifest is automatically merged)The
<queries>block is placed only in the library manifest (oneloginoidc), which Android's manifest merger propagates to any consuming app automatically. This means library consumers get the fix without any manual configuration.Backwards compatibility:
<queries>is a build-time declaration only. It has no effect on devices running Android 10 or below, andminSdkVersionremains 19.Test plan
<queries>in both demo apps (appandappjava)