[guardian-dev] otrchat/gibber git reorg

Hans-Christoph Steiner hans at at.or.at
Thu Jan 20 10:56:12 EST 2011


On Jan 20, 2011, at 4:35 AM, Nathan Freitas wrote:

> On 01/18/2011 01:14 PM, Hans-Christoph Steiner wrote:
>> It seems that using a RemoteService, you can't send an exception  
>> back to
>> the Activity that sent the Intent.  So for our case, if there is an
>> issue with the OTR (like a new fingerprint, etc) then it should  
>> probably
>> pop up the Gibber Activity for handling this, no matter which app is
>> doing the message sending.
>
> I think you would always front-end the RemoteService with an Activity
> for manage the Intent interaction. We could design specific Activities
> to handle the app-to-app interaction. There would be an Activity for
> authorizing apps to use the Gibber App Messging Engine (GAME!), which
> should show a yes/no dialog perhaps. There would be another Activity
> that would work sans-UI or perhaps with a progress dialog to  
> indicating
> message sending success/failure.
>
> I know this is work that is tangential to our core goals with this  
> stage
> of Gibber, and while we won't get to it for a few months (unless  
> another
> dev jumps in), I am mostly hoping it can inform our design decisions  
> at
> this stage.
>
> +n8fr8


Perhaps I'm missing something, but from my understanding of Android,  
in order to have two-way communication from any app to a given  
Service, that Service needs to be a RemoteService and has to set up  
Interfaces using AIDL.  I think Intents are supposed to send a one-way  
message to another app.

Also, I found this on an Android forum, which seems to say that just  
using Intents and Activities will not survive the Android lifecycle:

"You almost definitely don't want to pass IBinder objects through
anything except an IDL interface.  If you put one in to the Bundle of
an Intent or activity result, you have no guarantee it will remain
valid -- once you hand it off to the other application, your
application goes into the background, and may be killed at any time.
The fact that the foreground app has a references on some IBinder in
your process is not enough to keep it around; that is what Service is
for, to tell the system about such dynamic dependencies between
applications (and also, through the connection interface, to allow you
to recover if the application hosting the service does go away and
come back)."

http://groups.google.com/group/android-developers/browse_thread/thread/fad05fd8151afe5c

.hc


----------------------------------------------------------------------------

"[W]e have invented the technology to eliminate scarcity, but we are  
deliberately throwing it away to benefit those who profit from  
scarcity."        -John Gilmore




More information about the Guardian-dev mailing list