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

Crash on Android 14 due to missing RECEIVER_EXPORTED / RECEIVER_NOT_EXPORTED flag #20

Open
wba2hi opened this issue Nov 16, 2023 · 0 comments

Comments

@wba2hi
Copy link

wba2hi commented Nov 16, 2023

Ramses Version:
1.1.0

Android Device:
Google Pixel 8 Pro, Android 14 (API 34)

When calling RamsesThread#initRamsesThreadAndLoadScene the app crashes on Android 14 due to missing RECEIVER_EXPORTED / RECEIVER_NOT_EXPORTED flag during the registration of the RamshCommandBroadcastReceiver in RamsesBundle:24

The targetSdkVersion must be 34 for the crash to occur.

See here for more information: https://developer.android.com/about/versions/14/behavior-changes-14#runtime-receivers-exported

java.lang.SecurityException: org.eclipse.kuksa.demo: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
at android.os.Parcel.createException(Parcel.java:3041)
at android.os.Parcel.readException(Parcel.java:3024)
at android.os.Parcel.readException(Parcel.java:2966)
at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5684)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1852)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1792)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1780)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755)
at com.bmwgroup.ramses.RamsesBundle.<init>(RamsesBundle.java:49)
at com.bmwgroup.ramses.RamsesThread$1.run(RamsesThread.java:125)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:13927)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2570)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2720)
at android.os.Binder.execTransactInternal(Binder.java:1339)
at android.os.Binder.execTransact(Binder.java:1275)
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

No branches or pull requests

1 participant