Don't use activities as the contents of your tabs. Use views as the
contents of your tabs. Then, everything is in one activity, and
sharing your socket isn't an issue. This also takes up less RAM, less
stack space, and less CPU.

Or, consider having a Service manage your socket connection.

On Wed, Sep 15, 2010 at 2:07 PM, mastergap <[email protected]> wrote:
> Hi, i want to share streams of a socket connection between the
> activities of a tab view. In particular the tab activity creates the
> socket and gets the i/o streams,so i want that tabbed activities use
> these streams to retrieve informations without reconnect to the server
> each time i switch from a tab to another. I know i can use the
> application class to have a global state, but i don't know how. Can
> you give me sole tips about this, or post some code snippets, or
> suggest to me some other solutions? Thanks a lot.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to