i want change my status to mode to (away,busy,available…etc) … how to do this when i login using my progrom
i am using smack…
class connect{
Collection entries;
XMPPConnection con;
ConnectionConfiguration config ;
Roster addlist;
public void conestablish(){
try{
config = new ConnectionConfiguration (“talk.google.com”,5222,“gmail.com”);
config.setCompressionEnabled(true);
config.setSASLAuthenticationEnabled(false);
con = new XMPPConnection(config);
con.connect(); /* Connect to the XMPP server */
con.login(“user”,“password”);
Thread.sleep(2000);
Presence pre=new Presence(Presence.Type.available);// this is not working
pre.setMode(Presence.Mode.away); //it show available always…
}
catch(Exception e){
}
}
}
plzzz help
thanks in advance