powered by Jive Software

Session with openfire

Good night,

How I can pass sessions or save ?

example in android

“activity” - > “activity2”

Y tried

// ---------- 1 option

public Connect getSession(){

return this;

}

Another activity get

Connect connect = new Connect();

connect.getSession();

connect.disconect();

The value conection = null

// -------------- 2 option

public XMPPConnection getSession(){

return this.connection;

}

Another activity get

Connect connect = new Connect();

XMPPConnection conn = new XMPPConnection ();

conn = connect.getSession();

conn.disconect();

BUT conn.disconect(), is of the class principal XMPPConnection , not is my class Conection … and stoped program and error ! stop

Any idea ?