On Mon, Jul 26, 2010 at 5:38 AM, zj h <[email protected]> wrote:

> Assume that there activity A and B, A has a handler, now B is activate by
> A, how can i pass the handler to B?
>

You don't.


> Currently i have a thread receive messages from socket, and dispatch
> messages to A and B, I think when B is activated, pass handler to B,
> then the handler can receive message from the thread.
>

You might consider having this socket listening functionality in a Service,
then your two activities can bind to it as necessary.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
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