Skip to main content

Screen Rotation Causes Android Application to Crash


Technote (troubleshooting)


Problem(Abstract)

When creating an Android environment for a Worklight application, Worklight will automatically set the minimum supported Android API level for your application (via the android:minSdkVersion attribute in AndroidManifest.xml) to the lowest Android API level installed on your system. In the event that you wish to target a higher Android API Level (via the android:targetSdkVersion attribute in AndroidManifest.xml), special care must be taken. When the target Android API level is greater than or equal to 13, a new configuration change named "screenSize" will be sent to your application upon a screen rotation. Unless you specifically handle that event (via the android:configChanges attribute in AndroidManifest.xml), your application will crash when a screen rotation occurs when running on an Android device that supports an Android API level greater than or equal to 13.

Resolving the problem

Any Android application that targets an Android API level greater than or equal to 13 must include the "screenSize" configuration change in the android:configChanges attribute of AndroidManifest.xml.

Cross reference information
Segment Product Component Platform Version Edition
Mobile- Speech and Enterprise Access IBM Mobile Foundation Application Development Google Android 5.0.6 Consumer, Enterprise

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

IBM Worklight

Application Development


Software version:
5.0, 5.0.0, 5.0.0.1, 5.0.0.3, 5.0.5, 5.0.5.1, 5.0.6


Operating system(s):
Google Android


Software edition:
Consumer, Enterprise


Reference #:
1628197


Modified date:
2013-03-12

Translate my page

Content navigation