Phonegap/Cordova orientation change Android 4

Posted by user1477576 on Stack Overflow See other posts from Stack Overflow or by user1477576
Published on 2012-06-24T03:07:42Z Indexed on 2012/06/24 3:16 UTC
Read the original article Hit count: 301

I have a problem changing the orientation of the device (Android 4). In other versions it works fine. Versión of Cordova: cordova-1.8.0.js / cordova-1.8.1.js In Android 4 the app crash or show: "A network error occurred. (file:///android_asset/www/index.html)" I searched a lot about this and no answer solves the problem.

In most cases users suggest adding: android:configChanges="orientation|keyboardHidden|screenSize"

In other cases: super.setIntegerProperty("loadUrlTimeoutValue",60000);

That not work for me :(

My manifest activity:

    <activity
        android:name=".AppNameActivity"
        android:label="@string/app_name" 
        android:configChanges="orientation|keyboardHidden|screenSize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

The application should run on Android 2.2 to 4.

Thank you very much for the help.

© Stack Overflow or respective owner

Related posts about android

Related posts about web-development