I have 2 Activities in my client/server project:
1 – login (openning connection)
2 – Handeling the game.
i tired passing Socket , ObjectInputStream , ObjectOutputStream objects with Intenet and startActivity but it can pass only serializable objects.
how can i pass this objects ?
i read that i can use the application tag for this use but i didn’t understand how.
can you guys lead me to the solution
thanks.
Another thing you could do is store a reference to stream/socket objects in a statically accessible class, and then pick them up from the other activity.
Mandatory warning about static access in android: make sure that anything you store statically has no direct or indirect references to View or Activity objects, because this can cause memory leaks.