Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Can a Service talk back to an Activity?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mark Wyszomierski  
View profile  
 More options Jan 6 2008, 2:55 pm
From: Mark Wyszomierski <mar...@gmail.com>
Date: Sun, 6 Jan 2008 11:55:28 -0800 (PST)
Local: Sun, Jan 6 2008 2:55 pm
Subject: Re: Can a Service talk back to an Activity?
Wink, amazing. After researching this today I have come to the same
conclusion. If you were to open source this I would at least be
interested, and if others haven't picked this up yet, I'm guessing
it's because the API is so young most people haven't tried any real
IPC yet. Once you get into this though, it's very frustrating
realizing there's no (built in) way to do it.

Is there anything I can do to help? Do you really think you'd be able
to finish within the next few days? If not, I was going to look at
writing a simple socket class which could possibly be used for
bidirectional communication between processes. I am pretty new to
android so am not sure if it's possible but java supports it so...

Thanks for your response,
Mark

On Jan 6, 2:02 pm, Wink Saville <w...@saville.com> wrote:

> Mark Wyszomierski wrote:
> >>>  I'm extending the messaging to allow bi-directonal asynchronous messaging and will work within the same process or across processes.

> > Yes that is precisely what I need - is there any facility to do that
> > at the moment with the current API? My solution is rather messy as it
> > involves:

> >     1) The Activity binding to the remote Service, then calling its
> > exposed interface functions
> >     2) The Service broadcasts an intent back to the Activity to pass
> > some data back

> > This solution is pretty weak, there should be one way to pass bi-
> > directional messages? I'm used to win32 programming via pipes, shared
> > memory, etc. How can we do it with Android?

> > Thanks!

> I agree, that's why I'm working on an API that extends
> the current Android messaging. I'm not aware of any shared
> memory in Android, I think it goes against the intent (pun intended)
> of using Linux processes to protect components from each other,
> but it could be there.

> What I've done is to use the android.os.Message and android.os.Handler
> as the transports for a more complete Msg which I pass in
> the android.os.Message.obj field (I would have like to just extend
> android.os.Message but its final, bummer). I use that for intra-process
> messaging. I then tunnel Msg's between processes via java.net.Socket
> and deliver these inter-process messages via the intra-process messaging.
> The upshot is that a Msg can be sent via the inter-process or intra-process
> scheme seamlessly.

> Right now I've got the intra-process messaging working and the
> inter-process partially working and hope to have both functional
> in the next few days.

> After I've created this proof of concept, and if there is interest, I'll
> Open Source it and we can create something that is useful for
> many people.

> If you or anyone else is interested let me know, (wink at saville period
> com)

> Regards,

> Wink Saville- Hide quoted text -

> - Show quoted text -


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.