Restart on turning

Monkey Targets Forums/Android/Restart on turning

Midimaster(Posted 2013) [#1]
I updated my Monkey to V69. Now user of my app report about problems on Android 4.x. When they turn the smartphone to a other orientation, android restarts the app.

Does anybody had the same problems and knows what I do wrong?


DGuy(Posted 2013) [#2]
This may have something to do with it:

http://monkeycoder.co.nz/Community/posts.php?topic=3981


Midimaster(Posted 2013) [#3]
This very interesting...

Some weeks ago I did change targetSdkVersion to 17...

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="17" />

..., because I heard, this is important for to run the app also on 4.xx

So now I have to set also set...

android:configChanges="keyboardHidden|orientation|screenSize"

.. to forbid android to restart the app on every orientation change.


This opens the question "is it really necessary to set the targetSdkVersion to 17?" What is the optimal value we should use in the manifest?

Is it better to use "targetSdkVersion to 17" together with "screenSize"? Or is it better to set back "targetSdkVersion to 7" like monkeys default value?


I can do some experiments with this together with my testers. But perhaps somebody is expert in this and can tell us insider informations? What side effect are to be expected?


DGuy(Posted 2013) [#4]
As I understand it:

1) Set "targetSdkVersion" to the highest SDK version the app has been tested against.

2) If "targetSdkVersion" is set to API level "13" or higher, add "screenSize" to "android:configChanges" to maintain API level 12 and lower like behavior (ie. no activity restart on orientation change.)