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

Not discovering browsers on Android 11 when they are available. #3

Closed
czlucius opened this issue May 26, 2021 · 0 comments
Closed

Not discovering browsers on Android 11 when they are available. #3

czlucius opened this issue May 26, 2021 · 0 comments
Assignees

Comments

@czlucius
Copy link
Owner

On Android 11, due to a package query limitation, the app cannot scan for other apps(e.g. browsers) that can open the URL, when the browsers are indeed on the device.
This is due to <queries> declaration in AndroidManifest.xml not implemented properly, hence the app is not given permissions to scan for packages; intent.resolveActivity always returns null.

Steps to reproduce:

  1. Open the app
  2. Point the camera at a QR code/barcode which contains a web URL.
  3. Click the associated action, "Open link"

Expected behaviour:
App redirects to browser, or displays a chooser dialog if multiple browsers are available, or displays a toast "No browsers found" when no browsers to open the QR code are found.

Actual behaviour:
"No browsers found" displayed even when browsers are found. (see video attached)

Affected devices:
All devices running Android 11 (API 30) and above.

Possible solutions

  1. Remove the queries tag and add a try-catch block, catching ActivityNotFoundException, when no browsers are found.
  2. Properly implement the queries tag, so that app has the proper permissions to scan for browsers (or apps with intent filter Intent.ACTION_VIEW)
1_Code.Scanner_20210525_.mp4
@czlucius czlucius self-assigned this May 26, 2021
czlucius added a commit that referenced this issue May 27, 2021
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

No branches or pull requests

1 participant