[guardian-dev] otrchat/gibber git reorg

Hans-Christoph Steiner hans at at.or.at
Tue Jan 18 13:14:48 EST 2011


On Jan 17, 2011, at 7:12 PM, Hans-Christoph Steiner wrote:

>
> On Jan 17, 2011, at 5:51 PM, Nathan Freitas wrote:
>
>> On 01/17/2011 04:20 PM, Hans-Christoph Steiner wrote:
>>> The hang up now is sorting out the design of the OTR in the Android
>>> Remote Service and AIDL stuff.  Anyone know this stuff well and  
>>> can give
>>> us advice on how best to structure it?  Its not so  
>>> straightforward, and
>>> someone's experience could show us the direct path thru the whole  
>>> thing :)
>>
>> I +1 on this idea, too, but think we could implement this better as  
>> an
>> Intent. Essentially, your app would simply provide the buddy/contact
>> name, your account identifier, and the text you would like to send  
>> to them.
>>
>> Intent i = new Intent();
>> i.setAction("info.guardianproject.gibber.SEND_MESSAGE");
>> intent.putExtra("to","trustyfriend");
>> intent 
>> .putExtra 
>> ("authkey 
>> ","SOME_SORT_OF_KEY_GENERATED_WHEN_YOU_ENABLE_APP_FOR_GIBBER");
>>
>> intent.putExtra("message","i am at the combination pizza hut/taco  
>> bell");
>> context.sendBroadcast(i);
>>
>> Seems pretty simple, but something we'd need to be assure couldn't be
>> abused.
>>
>> BTW, we already have one of these built into Orbot for requesting a
>> hidden service to be enabled on a specific port for third-party apps,
>> and the intent will return a .onion address for you.
>
>
> That could be a nice simple way to do it.  How would the external  
> app then receive a message via gibber/otrchat?
>
> From what I see from the Intent approach, the external app sending  
> the message will then have to entirely assume that the message  
> encryption is going to be handled by gibber/otrchat.  That means  
> then in order for this Intent to be guaranteed to be an encrypted  
> message, gibber/otrchat will have to only maintain OTR-encrypted  
> sessions.  So if gibber can't establish an OTR connection, could  
> gibber then bounce the error back to the external app via the Intent?


Just digging deeper into AIDL and Remote Services.  It sounds like in  
order to send an Intent to another process like a Service from another  
app, there needs to be an AIDL interface and a RemoteService.

"If you have code in one process (for example, in an Activity) that  
needs to call methods on an object in another process (for example, a  
Service), you would use AIDL to generate code to marshall the  
parameters."

from http://developer.android.com/guide/developing/tools/aidl.html

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.

.hc

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

Access to computers should be unlimited and total.  - the hacker ethic




More information about the Guardian-dev mailing list