Summary
Running on an Android device with Android 14+ will throw an error on the Activity.OnCreate method
Java.Lang.SecurityException: ' One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts'
As per Google, IntentFilters must explicitly declare RECEIVER_EXPORTED/RECEIVER_NOT_EXPORTED flag or the OS will just crash the app:
https://developer.android.com/develop/background-work/background-tasks/broadcasts#context-registered-receivers
Comments
Requires updated SDL code, eg.
Current code has
|
mContext.registerReceiver(mUsbBroadcast, filter); |
But new SDL properly declares
https://github.com/libsdl-org/SDL/blob/3d42412650119a8e13a016e289e5860c034dde19/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java#L196-L200
No workaround for Android 14+ due to it baked in the OS.
Summary
Running on an Android device with Android 14+ will throw an error on the Activity.OnCreate method
Java.Lang.SecurityException: ' One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts'As per Google, IntentFilters must explicitly declare RECEIVER_EXPORTED/RECEIVER_NOT_EXPORTED flag or the OS will just crash the app:
https://developer.android.com/develop/background-work/background-tasks/broadcasts#context-registered-receivers
Comments
Requires updated SDL code, eg.
Current code has
Silk.NET/src/Windowing/SilkDroid/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
Line 196 in 9b12fbe
But new SDL properly declares
https://github.com/libsdl-org/SDL/blob/3d42412650119a8e13a016e289e5860c034dde19/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java#L196-L200
No workaround for Android 14+ due to it baked in the OS.