Monday, 30 September 2013

error string types not allowed (at 'configchanges' with value 'orientation screensize')

screenSize & smallestScreenSize attributes are not available in SDK 10.They are been introduced in API level 13.

Sunday, 22 September 2013

java.lang.NullPointerException in phonegap android

Its your code :-

public class MainActivity extends DroidGap {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);


appView.addJavascriptInterface(this, "MainActivity");
super.loadUrl(Config.getStartUrl());
}


}
Change the code :-
public class MainActivity extends DroidGap {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.init();

appView.addJavascriptInterface(this, "MainActivity");
super.loadUrl(Config.getStartUrl());
}


}

Monday, 16 September 2013

PhoneGap tutorial for beginers

http://www.javacodegeeks.com/2013/06/getting-started-with-phonegap-in-eclipse-for-android.html

Thursday, 12 September 2013

java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap in smack

This error is due to your connection is not established or your connection is disconnect
so please check whether your connection is established or not

Check the presence of user friends by smack library

where con is xmpp connection,
presenceChanged is called when any friends is going offline or online 

Roster roster = con.getRoster();
roster.addRosterListener(new RosterListener() {
    // Ignored events public void entriesAdded(Collection<String> addresses) {}
    public void entriesDeleted(Collection<String> addresses) {}
    public void entriesUpdated(Collection<String> addresses) {}
    public void presenceChanged(Presence presence) {
        System.out.println("Presence changed: " + presence.getFrom() + " " + presence);
    }
});
presence.getType() return availability and presence.getMode() return away(),busy this type of options

Wednesday, 4 September 2013

Procedure to register to sync my calender to google calender

http://samples.google-api-java-client.googlecode.com/hg/calendar-android-sample/instructions.html

Sunday, 1 September 2013

rectangle shape on editext

http://blog.vogella.com/2011/07/19/android-shapes/

     android:shape="rectangle">
     <stroke android:width="2dp" android:color="#FFFFFFFF" />
     <gradient android:startColor="#DD000000" android:endColor="#DD2ECCFA"
            android:angle="225"/>
    <corners android:bottomRightRadius="7dp" android:bottomLeftRadius="7dp"
     android:topLeftRadius="7dp" android:topRightRadius="7dp"/>
</shape>



<EditText android:layout_width="fill_parent" android:text="1"
        android:layout_height="wrap_content" android:id="@+id/editText1"
        android:inputType="numberSigned"
        android:layout_margin="5dip" android:gravity="center">
        <requestFocus></requestFocus>
    </EditText>