i’ve been battling with the problem of changing orientation under Android.
i’ve been foolishly following wild geese trying to find why my app quits when i change orientation until i discover that apps QUIT when changing orientation! more specifically, they are restarted in the new position.
Turned out this was causing my app to crash due to a global static singleton i was using. statics in the jni do not get reset through this restart.
i fixed this and it works but, as you might expect, it is slow to come up due to starting over, reading config files and all that. so i’ve been trying to change the build so that it does not do this restart malarkey.
here are my changes that worked here. i’m hoping Jules might put something like this into the official Juce build, because i think the default restart behaviour is poor.
i added the following to the tag in AndroidManifest.xml
then i changed the default Activity subclass generated by Juce as follows,
public void onConfigurationChanged(Configuration cfg)
this worked for me on actual hw. it’s possible that there’s more to it than this. there always is.