tags:

views:

42

answers:

1

Hi, The object passing between an Android service and the remote binder is happening through serialization of the object. If the service needs to return a very large collection, it seems very inefficient to use this. What is the recommended way to deal with this?

Thanks.

+1  A: 

In Android you should implement Parcelable rather than Serializable on your objects, as the performance is much better. Your AIDL method can then specifiy a Parcel as an argument.

Here's the SDK documentation about passing Parcelable objects to a Service which has some sample code.

Dave Webb