Hi, Dianne-

True. But since, as you say, "You still need to use some other
facility (such as a service) to connect those processes
though", it seems rather unlikely the OP would be better off choosing
to implement such a service instead of using an Intent for inter-
process communication.

Setting up the service takes more overhead (and requires Intents
anyway), so it should be done only if really necessary. But the OP has
not told us enough about what he is doing for us to decide whether or
not it is really necessary. So either he coughs up the info or he
figures it out for himself after studying the links you referred him
to (and also the Dev Guide on "Intents and Intent Filters").

Based on what he has said, my guess is that he is better off not using
Handler at all (for interprocess communication: who knows what other
use he might have for it), he should use Intents instead.

On Aug 18, 4:33 pm, Dianne Hackborn <[email protected]> wrote:
> In fact Handler only works in a single process.
>
> You can use Handler.getMessenger() for a Binder object that you can send to
> another process for it to deliver messages to that handler.  You still need
> to use some other facility (such as a service) to connect those processes
> though.
>
> See:http://developer.android.com/reference/android/app/Service.html#Remot...
>
> On Wed, Aug 18, 2010 at 1:48 PM, Indicator Veritatis <[email protected]>wrote:
>
>
>
> > But why are you so ure you must use Handler? The design of Android is
> > that you use Intents for interprocess communication. Nearly always, if
> > not always.
>
> > Handler is meant for communication between threads of a single
> > process.
>
> > On Aug 13, 5:15 am, "pnk.444" <[email protected]> wrote:
> > > Hi,
>
> > >   I have to post messages from one process to another process by using
> > > handler .
>
> > >   I am using Handler.post/Handler.sendMessage but i am not getting
> > > those messages
> > >   in another process. I am not getting any exceptions also.
>
> > >    Is it possible to sent messages across processes using Handler?
>
> > >    If it is the case how can i do it?
>
> > >  Thanks in advance.
>
> > --
> > 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]<android-developers%[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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