tags:

views:

23

answers:

1

Ideally I would like to send an object of type

 ArrayList<ArrayList<ASimpleClass>> 

from a remote service in one APK to an application in another. I'm not sure if this is even possible as the API demo code suggests that it isn't:

/**
 * This demonstrates the basic types that you can use as parameters
 * and return values in AIDL.
 */
void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat,
        double aDouble, String aString);

whilst the autocomplete for writeTo/readFromParcel suggests that other types are an option (though read options don't match write). I would settle for just ArrayList if necessary. If it is possible, I'd much appreciate a pointer to some sample code, or a way to cast the above types into something acceptable to the remote interface AIDL. Can anyone shed any light on this question please?

A: 

http://developer.android.com/reference/android/os/Parcel.html

If what you want isn't on the list of supported methods, you can still send it provided that you write code to dump it out to a series of supported types and rebuild it on the other side.

Chris Stratton
Thanks for the pointer. I think I may have seen it before but the documentation isn't that illuminating. I found this: http://www.anddev.org/simple_tutorial_passing_arraylist_across_activities-t9996.html to show me an actual example
NickT