I've read Android Developer sites about Parcels and AIDL but I still have a question. Why can a Parcelable object be returned from an AIDL interface method but not passed as a p开发者_如何学Carameter into an AIDL method? I know that AIDL interface methods want primitive data types (as stated by the android developer website) but I am able to pass a Uri object in as a parameter - so why can I not pass a Parcelable object in?
You can pass parcelable objects using AIDL. The docs say "If you have a class that you would like to send from one process to another through an IPC interface, you can do that. However, you must ensure that the code for your class is available to the other side of the IPC channel and your class must support the Parcelable interface."
http://developer.android.com/guide/components/aidl.html#PassingObjects
精彩评论