coronalabs / corona

Solar2D Game Engine main repository (ex Corona SDK)
https://solar2d.com/
MIT License
2.54k stars 273 forks source link

Android: investigate and fix exact alarms crash on Android 14 #676

Closed Shchvova closed 8 months ago

Shchvova commented 9 months ago

google changed APIs because why not, it is fun to make people's apps crash image

ggcrunchy commented 9 months ago

Another one: https://forums.solar2d.com/t/display-capturescreen-true-fails-on-android-13/356249

I did some investigations for that and wrote up some comments in a conversation (but haven't tried implementing anything):

"ggcrunchy — 01/10/2024 12:21 PM According to https://stackoverflow.com/a/74296799 you just omit it, but I imagine that would just switch the failures around."

"ggcrunchy — 01/10/2024 12:42 PM I'm guessing https://developer.android.com/reference/android/os/Build.VERSION#SDK_INT is what needs to be checked against (I see something other checks against 16... I guess this would be 33 or something? Tiramisu?). So... I assume either https://github.com/coronalabs/corona/blob/master/platform/android/sdk/src/com/ansca/corona/CoronaActivity.java#L2707 or https://github.com/coronalabs/corona/blob/master/platform/android/sdk/src/com/ansca/corona/NativeToJavaBridge.java#L1217 needs a bypass for whatever the appropriate version is. (Probably both, but not clear which one is relevant in this case.)

This too, probably: https://github.com/coronalabs/submodule-plugins-network/blob/c0bb6cf0760765bde679242ac41db53f1221cbff/android/src/network/NetworkRequest.java#L1127"

"ggcrunchy — 01/12/2024 5:40 PM There isn't actually a write version of those flags, as far as I can tell. I think it's more an issue that it's trying to enforce no-longer-relevant permissions."

scottrules44 commented 9 months ago

It looks like someone submitted a pull request for this issue already

https://github.com/coronalabs/corona/pull/659/files

sekodev commented 8 months ago

This warning seems to be listed as an error now. @Shchvova can you take a look at that PR @scottrules44 mentioned? This seems to be a blocking problem now as mentioned in the forums: https://forums.solar2d.com/t/google-play-reports-our-apps-as-having-a-defective-sdk/356389

Shchvova commented 8 months ago

Merged the PR. Will update documentation to reflect changes and make a build.