Friday 27 April 2012

PhoneGap Android orientation.

My PhoneGap application exited when device orientation changed.
These code will solve the problem. Update AndroidManifest with the code as highlighted in the example. 


    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".EStoryBooksActivity"
            android:label="@string/app_name"
            android:configChanges="orientation|keyboardHidden" >
            <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"> 
            
            <intent-filter> 
            </intent-filter> 
        </activity>
    </application>

For Android SDK 3.1 need to add screen size to the config.

android:configChanges="orientation|screenSize|keyboardHidden

Monday 23 April 2012

Web Apps

Another book to read. It give a good advice on how to create a web apps instead of website.

Wednesday 11 April 2012

DIVE INTO HTML5

This book "Dive into HTML5" have good explanations of HTML5 features. Highly recommended to read.