Ver la Versión Completa : Intent pass object session !
drakgoku1
18/02/14, 13:47:34
class Connect implements serializable{...}
Connect connect;
.
intent.putExtra("connection", connect);
and get other activity
connect = (Connect) intent.getSerializableExtra("connection");
connect = null
Cuando intento recoger el valor me sale null, que hago mal ? al enviar o al recibir ?
kriogeN
18/02/14, 14:02:50
Could you put the whole code?
drakgoku1
18/02/14, 17:41:06
Could you put the whole code?
This is my code lite :
Class Connect implements Serializable{
..
private static final long serialVersionUID = 1L;
transient ConnectionConfiguration config;
transient MultiUserChat muc;
transient XMPPConnection connection;
transient ExecutorService executor;
..}
MainActivity{
// 1 form not work but send correctly with implements in serializate class Connect
// Bundle bun = new Bundle();
// bun.putSerializable("connection", connect);
// intent.putExtras(bun);
// 2 form not work but send correctly with implements in serializate class Connect
// Bundle bun = new Bundle();
// bun.putParcelable("connection", (Parcelable) connect);
// 3 form not work but send correctly with implements in serializate class Connect
// intent.putExtra("connection", connect.getSession());
}
SecoundActivity {
connect = (Connect) intent.getSerializableExtra("connection");
// getParcelableExtra if send parse
}
And I get null !!!!!!!!!!!!!!!!!!!!!!
vBulletin® v3.8.1, Copyright ©2000-2026, Jelsoft Enterprises Ltd.