Mobile app crashes on orientation change

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
Paul_Ramcharitar
Profound User
Posts: 91
Joined: Fri Aug 03, 2012 11:07 am
First Name: Paul
Last Name: Ramcharitar
Company Name: Banks DIH
City: Georgetown
Zip / Postal Code: 592
Country: Guyana
Contact:

Mobile app crashes on orientation change

Post 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.
Paul_Ramcharitar
Profound User
Posts: 91
Joined: Fri Aug 03, 2012 11:07 am
First Name: Paul
Last Name: Ramcharitar
Company Name: Banks DIH
City: Georgetown
Zip / Postal Code: 592
Country: Guyana
Contact:

Re: Mobile app crashes on orientation change

Post 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
Antonio
Profound User
Posts: 82
Joined: Fri Jun 29, 2012 2:33 pm
First Name: Antonio
Last Name: Ruballos
Company Name: Profound Logic
Contact:

Re: Mobile app crashes on orientation change

Post 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.
Paul_Ramcharitar
Profound User
Posts: 91
Joined: Fri Aug 03, 2012 11:07 am
First Name: Paul
Last Name: Ramcharitar
Company Name: Banks DIH
City: Georgetown
Zip / Postal Code: 592
Country: Guyana
Contact:

Re: Mobile app crashes on orientation change

Post by Paul_Ramcharitar »

OK great, glad to help!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 7 guests