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 crash on android 14 #647

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joaompneves
Copy link

@joaompneves joaompneves commented Mar 10, 2024

In Android 14, registerReceiver fails because its now missing and extra flag. This PR fixes that behavior.

Tested on an Android 14 device.

@saghul
Copy link

saghul commented Mar 12, 2024

It would be really useful to have a release with this PR included 🙏

@@ -177,7 +177,7 @@ public synchronized void register() throws IllegalStateException {
// avoid acquiring intent data failed in receiver on Android12
// when using PendingIntent.FLAG_IMMUTABLE
// because it means Intent can't be modified anywhere -- jiangdg/20220929
int PENDING_FLAG_IMMUTABLE = 1<<25;
int PENDING_FLAG_IMMUTABLE = 0x04000000;
Copy link

Choose a reason for hiding this comment

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

Good catch!

@joaompneves
Copy link
Author

@jiangdongguo can you release a new version with this fix? Without it its impossible to use on Android 14.

saghul added a commit to react-native-webrtc/react-native-webrtc that referenced this pull request Mar 12, 2024
saghul added a commit to react-native-webrtc/react-native-webrtc that referenced this pull request Mar 12, 2024
@saghul
Copy link

saghul commented Mar 22, 2024

Gentle ping :-)

@Abhi-sirohi
Copy link

when will this PR is going to merge any idea?

@ThapeloMM
Copy link

@joaompneves any update on the new release fix for android 14?

@davidbtadokoro
Copy link

Hi @joaompneves, this is a great change! How can I use this version on another project while this isn't merged?

@joaompneves
Copy link
Author

You need to build the project.

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.

None yet

5 participants