Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix geo intents on Android 11+ #963

Merged
merged 1 commit into from
Mar 27, 2022

Conversation

bherbst
Copy link
Contributor

@bherbst bherbst commented Mar 26, 2022

Summary:
Trying to tap on an event's location on Android 11+ currently results in a toast that says "No app can handle that request".

This is because Android 11 and above require applications that query other packages to declare what they want to query in the manifest with <query> tags. See package visibility for more info on this change.

The only reason we used this was to check if our links could be handled before launching them. Just launching the intent and catching any resulting ActivityNotFoundException has the same effect, so that's the route I went to fix.

Test Plan:

Tested current behavior on Android 12L, and it works now!
I also changed the geo: intents to some garbage text to test the not found behavior, and confirmed the toast still displays as expected for unhandled intents.

Instead of querying for packages (which now requires <queries> entries in the manfiest, just catch ActivityNotFoundException
@phil-lopreiato
Copy link
Member

Thanks for the fix!

@phil-lopreiato phil-lopreiato merged commit 8ccf6d5 into the-blue-alliance:master Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants