-
Notifications
You must be signed in to change notification settings - Fork 85
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
[Android] Android 14 / api 34 Crashing issue on android 14 devices #663
Comments
Just copying over my notes from don/cordova-plugin-ble-central#1020 (comment) 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 |
Same issue happen on cordova capacitor. Please check https://github.com/cordova-sms/cordova-sms-plugin/pull/233/files
|
@Marcello17 or @lajith111 do either you have the capacity to see if #667 fixes the problem for you? |
I've tested out your solution and it didn't work BUT it looks like it's not a ble capacitor issue. I've used your method on the @capacitor/share which also had a broadcast receiver and it worked! But then I realized that I also had to update the @cacpacitor/share from version '5.0.7' to the latest '6.0.1' so in the end for me it was the @capacitor/share plugin in the SharePlugin.java file that was causing the issue |
Thank you @Marcello17 for reporting back. I can confirm that with
my test app works fine on an Android 14 device. |
Describe the bug
I've upgraded my app using :
compileSdkVersion = 34
targetSdkVersion = 34
java.lang.RuntimeException: Unable to start activity ComponentInfo{mypackagename/MainActivity}: java.lang.SecurityException: mypackagenamei: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
I see the files show this:
context.registerReceiver(stateReceiver, intentFilter)
does this need to be adjusted to accommodate android 14?
To Reproduce
Steps to reproduce the behavior:
Set the API to 34:
compileSdkVersion = 34
targetSdkVersion = 34
Screenshots
Plugin version:
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: