-
Notifications
You must be signed in to change notification settings - Fork 607
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
API 34 : One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts #1020
Comments
Thanks for this @QuentinFarizon ... I'll take a look tomorrow. |
Relevant documentation from Android on this:
Although these are all system broadcasts, because they're being registered via an Activity, they're effectively context-registered receivers, and thus need a |
@QuentinFarizon I've published this as cordova-plugin-ble-central@1.7.5-alpha.0. |
@peitschie I think you can use |
I can, but only if I mandate a compile SDK version that's new enough. I have a plan/patch in progress for this, but wanted to get a fix out ASAP given the impact this seems to have on Android v34. |
…1020) A clear exception has been carved out for system broadcasts registered via Context#registerReceiver See https://developer.android.com/about/versions/14/behavior-changes-14#system-broadcasts
…1020) A clear exception has been carved out for system broadcasts registered via Context#registerReceiver See https://developer.android.com/about/versions/14/behavior-changes-14#system-broadcasts
Hey @peitschie is this needed for the Slim variant too? As everyone else we are getting ready to target lvl 34, and we are using the slim variant, because of Android permissions |
Hey @QuentinFarizon and @peitschie Any update if this fix is needed for api level 34? |
Hi @sithwarrior This particular issue only occurs if you're listening to location state on Android. The normal Bluetooth enable/disable states are fine. Having said that, I've pushed out a 1.7.5 & 1.7.5-slim variant today, so feel free to use them. If you hit any problems, let me know. |
I got this crash in production after having deployed on the Play Store :
java.lang.SecurityException - <package>: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
It is found here :
https://github.com/search?q=repo%3Adon%2Fcordova-plugin-ble-central%20registerReceiver&type=code
Here is the fix :
https://stackoverflow.com/a/77276774
I could submit a PR but I don't whether it should be exported or not
The text was updated successfully, but these errors were encountered: