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

Android 14+ RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED error #2349

Open
Basewq opened this issue Jun 24, 2024 · 2 comments
Open

Android 14+ RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED error #2349

Basewq opened this issue Jun 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Basewq
Copy link
Contributor

Basewq commented Jun 24, 2024

Release Type: Official Release

Version: 4.1+

Platform(s): Android 14/API 34

Describe the bug
Trying to run a game on an Android device/emulator with Android 14/API 34 or above will throw the exception like:
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'

Additional context
Issue is identified/explained in this issue dotnet/Silk.NET#2232
There is no workaround for this issue due the check & error being baked into the Android OS and the fix must be implemented in the referenced library.

The solution requires updating Silk library to the version when this issue is closed


The following code will also need to be fixed on our end - testing will need to be done whether it needs to be Exported or if NotExported will suffice:

RegisterReceiver(ringerModeIntentReceiver, new IntentFilter(AudioManager.RingerModeChangedAction));

RegisterReceiver(ringerModeIntentReceiver, new IntentFilter(AudioManager.RingerModeChangedAction));

@Basewq Basewq added the bug Something isn't working label Jun 24, 2024
@Starkium
Copy link

is this definitely not something you can work around? This looks similar to something that was a problem in unreal engine and all we had to do was mark certain things as "exported" during build process.

@Rif009 Rif009 mentioned this issue Jun 24, 2024
8 tasks
@Basewq
Copy link
Contributor Author

Basewq commented Jun 24, 2024

is this definitely not something you can work around? This looks similar to something that was a problem in unreal engine and all we had to do was mark certain things as "exported" during build process.

Not possible here, the export declaration must be set in the java file of the SDL library because this was done in code so we need updated libraries.
Our dependency is Stride -> Silk -> SDL.
This has been fixed on SDL's end. Silk still needs to get the updated SDL code, then compile it for .NET interfacing.
Then we update our Silk reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants