[Android] Screen rotation forces the game to close

Found a bug in R'n'D? Report it here!

Moderators: Zomis, Flumminator

Post Reply
Posts: 317
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia

[Android] Screen rotation forces the game to close

Post by Eizzoux » Fri Nov 01, 2019 5:17 am

For some reason when the screen Auto-rotate is ON (and it's usually ON), and I rotate the phone, it forces the game (most recent version to just kind of... crash, but not fully. If I rotate it while preloading the game, it then continues after I return after crashing instead of restarting, I don't really know. So to avoid that, I instead have to primarily hold the phone in horizontal position so it would rotate before even launching the game. But that didn't occur on older versions, I remember that. I was rotating my phone while it was loading, and it was just changing viewport dynamically from portrait to album form in a few seconds. I'm not really sure, but I guess it's an error based off some recent fixes or anything...
Nothing in here...*

User avatar
Site Admin
Posts: 3268
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany

Re: [Android] Screen rotation forces the game to close

Post by Holger » Tue Nov 12, 2019 8:50 pm

Yes, I am aware of this bad behaviour (bug indeed) which apparently happens on older (or not so old?) Android versions.

I've tested the current release version with an old Android phone (S4 mini with Android 4.4) and with a new one (S10e with Android 9), with the following result:

- on the old phone, the app crashes when rotating the phone
- on the new phone, the app works fine when rotating the phone

The problem seems to be caused by recent changes in the file "AndroidManifest.xml" in the APK package to prevent nasty warnings on recent Android versions by increasing the "android:targetSdkVersion".

Unfortunately, this seems to result in "screenSize" events to be generated (in addition to the "orientation" events) when rotating the phone, which are not properly handled by the current Android R'n'D version (because of the missing "screenSize" flag in "android:configChanges").

The next release version will fix this bug (and will add a bunch of usability improvements for the Android version, too, especially making the touch devices configuration screen be usable again).

Post Reply