Hello

I can't manage to get AIDL working with my interface. I've defined a
set of AIDL Interface (A, B, C and D) in their own .aidl file, and the
compilation seem to be working. Now I'm defining a interface named E
who has method that can take A, B, C or D as parameter and that also
works.

But I can't manage to get a List of A for instance:

int getList(out List<A> aList)

or

List<A> getList()

returns almost the same non-understandable error in the
generated .java file :

The method writeBinderList(List<IBinder>) in the type Parcel is not
applicable for the arguments (List<A>)

The generated code is :

case TRANSACTION_getList:
{
data.enforceInterface(DESCRIPTOR);
int _arg0;
_arg0 = data.readInt();
java.util.List<com.blablabla.A> _arg1;
_arg1 = new java.util.ArrayList<com.blablabla.A>();
int _result = this.getAlbumsByUserId(_arg0, _arg1);
reply.writeNoException();
reply.writeInt(_result);
reply.writeBinderList(_arg1);

But in the generated  .java file, I can see clearly that my A.Stub
class extends android.os.Binder ...

If I try with just array (int getList(out A[] list) ), the compiler
complains

parameter 2: 'out A[] list can't be an array.

So, how can I do to get this list of object crossing the border of my
application? It there an easiest way for sending structure from a
service to the caller application?

Thanks for your help

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