The application closes when I rotate the phone.

66 views
Skip to first unread message

Klez

unread,
Mar 8, 2012, 5:03:03 AM3/8/12
to phon...@googlegroups.com
Hello 
I wonder why the app is closing (still works in the background) when I rotate the phone.

I have this value in application:
android:configChanges="keyboardHidden|orientation" 
android:screenOrientation="sensor"

Phonegap version: 1.4.1
Android SDK version: 2.3.3

Regards Klez!


Captain Obvious

unread,
Mar 8, 2012, 7:19:46 AM3/8/12
to phon...@googlegroups.com
android:configChanges="orientation|screenSize|keyboardHidden"

Klez

unread,
Mar 8, 2012, 8:21:01 AM3/8/12
to phon...@googlegroups.com
Yes, I'll tried that before but it give me the error: String types not allowed (at 'configChanges' with value 'orientation|screenSize|keyboardHidden')

Nasir

unread,
Mar 8, 2012, 8:34:34 AM3/8/12
to phon...@googlegroups.com
You should put this orientation in both of the activity.

<activity
            android:name=".SomeActivity"
            android:windowSoftInputMode="adjustPan"
            android:configChanges="orientation|keyboardHidden"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity 
             android:name="org.apache.cordova.DroidGap"
             android:label="@string/app_name"
             android:configChanges="orientation|keyboardHidden">            
        </activity>

Klez

unread,
Mar 8, 2012, 8:51:01 AM3/8/12
to phon...@googlegroups.com
Tnx, nice that worked!
Reply all
Reply to author
Forward
0 new messages