Re: [android-developers] Socket sharing between activities

2012-04-19 Thread Android007
Hi, I had the same problem as you do (sharing a TCP connection between activities) and I must with Dianne that if this is the case then you had better use a singleton. In my case I needed different apps to use one connection. This was not possible with a singleton because each app would call a n

Re: [android-developers] Socket sharing between activities

2012-04-16 Thread Kristopher Micinski
I would agree, the best thing for this would be a service that you can bind do and do AIDL calls through, along with coordinating other things. Passing the raw socket can be accomplished through the application object, though that sounds fairly dirty to me. This is a fairly common use case (in ch

[android-developers] Socket sharing between activities

2012-04-16 Thread Tonez
Hi Everyone, I'm building an Android app which uses TCP sockets to communicate with a .net server application. The android app as a whole relies quite heavily on TCP and as such nearly all the features in the app require writing to and listening from a socket stream. I'm trying to determine what