corona icon indicating copy to clipboard operation
corona copied to clipboard

Android: investigate and fix exact alarms crash on Android 14

Open Shchvova opened this issue 2 years ago • 2 comments

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

Shchvova avatar Jan 30 '24 22:01 Shchvova

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."

ggcrunchy avatar Jan 30 '24 23:01 ggcrunchy

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

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

scottrules44 avatar Feb 01 '24 19:02 scottrules44

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

sekodev avatar Mar 17 '24 11:03 sekodev

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

Shchvova avatar Mar 17 '24 15:03 Shchvova