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(share): Address Android 14 changes #1849

Merged
merged 7 commits into from
Nov 1, 2023
Merged

fix(share): Address Android 14 changes #1849

merged 7 commits into from
Nov 1, 2023

Conversation

jcesarmobile
Copy link
Member

This is the simpler solution I've found for addressing Android 14 changes.
I think FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT is safe to use because we only use the pending intent for getting the package of the app the user selected to share, we null the value right before the share starts so if somebody managed to get our BroadcastReceived it will have no effect.
But if somebody thinks this is unsafe I can try some different approach that doesn't use FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT.

@github-actions
Copy link

github-actions bot commented Oct 25, 2023

Released dev build of share with dev version: 5.0.7-dev-1849-20231101T165859.0

Copy link
Contributor

@ItsChaceD ItsChaceD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is a risk for using FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT for our use case, especially since it's null before the share starts. LGTM

@jcesarmobile jcesarmobile merged commit f5ca8e0 into main Nov 1, 2023
11 checks passed
@jcesarmobile jcesarmobile deleted the share-14b branch November 1, 2023 17:09
@bosh-code
Copy link

Sorry to comment on a closed PR, but can we please get this released in version 5.0.7?

@jcesarmobile
Copy link
Member Author

No, it’s a breaking change, targeting SDK 34 will only be supported in capacitor 6.

@ionic-team ionic-team locked as resolved and limited conversation to collaborators Nov 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants