On Nov 2, 12:37 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> On Wed, Nov 2, 2011 at 3:26 PM, randyv2 <randythech...@gmail.com> wrote:
> > Would it horrify you to know
> > that the link you provided is what I was using as a reference when I
> > started walking down this road? ;)
>
> That depends. Did you buy the book? :-)

Not yet, but it's quickly becoming apparent that I should :)  Where's
that company credit card...

> > 1. IGameInterface.aidl - This is the equivalent of IScript.aidl in the
> > sample code.  It has one method: void doStuff(IGameInterfaceResult
> > callback).
> > 2. IGameInterfaceResult.aidl - This is where the definition of the
> > interface for the callback goes. As in my original post, it has one
> > method: void success(Bundle).
>
> Where the Bundle is an out parameter?

Yes, it is currently defined as an out parameter (but see below).

> I misunderstood your situation, which is why the Map success()
> approach won't work. But, you might try:
>
> interface IGameInterfaceResult {
>        void success(Map result);
>
> }
>
> since you don't need the out, and the out is technically wrong in this
> case as I understand it. It may be that "out Map" doesn't work,
> generating the flawed code you found.
>
> Even if you're using Bundle successfully, I'd drop the out. You'd use
> out if the *callback* were trying to pass data in success() back to
> the *service*.

I misunderstood the directions that "in" and "out" mean, and had them
reversed.  It looks like the correct thing for me to do is change the
"out" to an "in" (AIDL complains without a default set, as both Bundle
and Map can be passed "in", "out", or "inout", and it wants you to
tell it exactly what it is you want).

Thanks for such a thorough response!  It's been very elucidating.

> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 4.0 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to