Monday, 15 July 2013

android - pass tcp client object to new activity -


I am creating an app that uses TCP, I have a TCP client object (after connecting to the server) Must pass in another activity. To wit. I have an activity that searches for a host, allows the client to connect, and then the introduction of captivity in the inclusion will start a new activity (game activity). I need something about how to pass client objects in game activity

I think in your case The best way would be to create a TCP connection in a singleton class, in this way you can access your connection in a simple Manner, a sample code. Apart from this, a better idea would be to use components from android.

No comments:

Post a Comment