But please read what I wrote, do NOT put this in to Intents or usually any
Bundle object.  This is primarily for communication with services.

On Thu, Jan 15, 2009 at 6:49 AM, Inderjeet Singh <[email protected]> wrote:

>
> Thanks, this is perfect for our use-case!
>
> Just to confirm: if you put an IBinder object in a bundle and it is
> shared across processes, any changes to the object state through proxy
> will be communicated back to the process owning the object. Is that
> correct?
>
> I dont know of another operating environment that is able to allow
> mutually untrusting apps to share live objects with each other. Yes, I
> know about Unix/Windows shared memory constructs but I was thinking
> more like Java, Javascript, etc. I am pleasantly surprised.
>
> Thanks
> Inder
>
>
>
> On Tue, Jan 13, 2009 at 7:25 PM, Dianne Hackborn <[email protected]>
> wrote:
> > No, this is wrong.
> >
> > - If you are putting normal objects (primitives, Parcelable,
> Serializable)
> > into the Bundle, they will be copied and re-instantiated as the Intent
> > travels into the system process and back to your app.
> >
> > - If you put IBinder objects in, a reference to the object will be
> > transfered, and you will receive back either the original object (if in
> the
> > same process) or a proxy object (if in another process).
> >
> > And please: DO NOT PUT IBINDER OBJECTS IN TO INTENTS.  In most places
> > hopefully the framework prevents this.  If you do, your app will break
> > occasionally, when its process gets killed and the activity using the
> object
> > is re-instantiated.
> >
>
> >
>


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