Re: [android-developers] socket sharing

2012-07-27 Thread Kristopher Micinski
Generally you write a service that handles it and coordinate network operations by using the service from different activities. kris On Fri, Jul 27, 2012 at 1:34 PM, bob wrote: > Is it possible to pass an open socket between different Activities in the > same Application? > > > Is this a reasona

[android-developers] socket sharing

2012-07-27 Thread bob
Is it possible to pass an open socket between different Activities in the same Application? Is this a reasonable practice or no? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@

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