What is it called ( what term should i google) when flipping/tilting the phone, so that the view rotates when running android?
My (OpenGL) application crashes when I do this, are there some certain steps you should do when handling OpenGL when this occures?
Is there something else I might want to think about?
if you don't set the AndroidManifest.xml 's attributes for activities that handle their own rotations, your activity will be restarted, the GL context will be recreated, and at least, any surfaces and buffers that you were using will be invalid.
in my gles 1.1 application, I have the following in my AndroidManifest.xml, which specifies that my application activity wants to live on through keyboard and orientation configuration changes, and that the application supports any orientation, but doesn't want it to change -because I don't want to deal with reloading textures or redoing the game layout (yet)
<application android:label="@string/app_name"
android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:debuggable="true">
<activity android:name="MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation"
android:screenOrientation="nosensor"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
The problem is like the configuration change that occurs when the screen orientation change occurs. See Configuration Changes. You might want to tell Android that you will handle the orientation change yourself, via the configChanges attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With