Tuesday, May 29, 2012

Connection to the server was unsuccessful

The issue occurs as the Android emulator is REALLY slow so a timeout occurs before loading index.html because it reacts too slow. 


In your custom Activity file before calling super.loadUrl add the following line: super.setIntegerProperty("loadUrlTimeoutValue", 60000);

Wednesday, May 23, 2012

PhoneGap Orientation

  1. For iOS
    1. Click on Project Name
    2. Go to Summary
    3. Select orientation you require for your PhoneGap application
  2. For Android
    1. Open AndroidManifest.xml
      1. In activity add "android:configChanges="orientation|screenSize|keyboardHidden"
      2. Add a new activity
        <activity android:configchanges="orientation|screenSize|keyboardHidden" android:label="@string/app_name" android:name="com.phonegap.DroidGap"> <intent-filter> </intent-filter> </activity>