Page 1 of 1

Mobile app crashes on orientation change

Posted: Thu Oct 04, 2012 5:29 pm
by Paul_Ramcharitar
I have been working on a mobile application for Android. I used the android template provided by profound ui and everything was working well on android 3.0.

I recently updated to android 4.0.3. Now when I launch the app, it runs, but as soon as I rotate the device it crashes.

Re: Mobile app crashes on orientation change

Posted: Thu Oct 04, 2012 6:16 pm
by Paul_Ramcharitar
After much searching, I found a solution to this problem.
I needed to add "screenSize" to android:configChanges in each Activity tag within the AnroidManifest.xml. So it would be like this: android:configChanges="orientation|screenSize|keyboardHidden"

The reason behind this is explained in this post: http://groups.google.com/group/phonegap ... fc4dd9daaf

Re: Mobile app crashes on orientation change

Posted: Mon Oct 08, 2012 7:54 pm
by Antonio
Thanks Paul!

I added this change to the Android Manifest file included in the template project, to prevent future users from experiencing this problem.

Re: Mobile app crashes on orientation change

Posted: Tue Oct 09, 2012 8:28 am
by Paul_Ramcharitar
OK great, glad to help!