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

Add support for Android 11 new privacy settings #335

Merged
merged 1 commit into from
Sep 8, 2020
Merged

Conversation

lbalmaceda
Copy link
Contributor

Changes

When this library is used on Android 11, the new privacy rules kick in preventing our CustomTabsController class to query for browser apps in order to pick the best candidate. The result is a failure, or an automatically cancelled authentication. By using the latest Android Gradle Plugin patch and adding the "queries" tag in the library's manifest, the final manifest

The lint-ignore rule at the top of the manifest is required until we target SDK 30. In order to do that, we need to migrate to and support AndroidX.

Compiling: For anyone running into compiling issues where the "queries" tag in the manifest is not a valid tag, that's because your app is using an old version of the Android Gradle Plugin that still doesn't have support for queries. Check the link below to learn to what version you should update.

References

Testing

I've tested this on a separate sample app that targets SDK 30. As seen in the attached screenshot, bottom right, the "queries" tag is added to the merged manifest file and comes from the changes on this PR.

image

I've also tested this when the sample app defines its own set of queries. And both turn out to be merged correctly, without the need to use any special node annotation.
image

Checklist

@lbalmaceda lbalmaceda added CH: Fixed small Small review labels Sep 7, 2020
@lbalmaceda lbalmaceda added this to the v1-Next milestone Sep 7, 2020
@lbalmaceda lbalmaceda requested a review from a team September 7, 2020 21:49
@lbalmaceda lbalmaceda merged commit 88b75d4 into master Sep 8, 2020
@lbalmaceda lbalmaceda deleted the fix-queries branch September 8, 2020 19:23
@lbalmaceda lbalmaceda modified the milestones: v1-Next, 1.26.0 Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Fixed small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No installed browser found on Pixel device with Android 11
2 participants