I’m developing an app that has a few services, which communicate using AIDL. In order to share data with them i use a Parcelable object.
Now, i have the problem that i must forward the information contained in the parcelable object to a remote tcp server.
Since parcelable it’s not equal to a serializable object in java, it’s possible to send it via tcp to a remote server ?
Since Parcelable objects have Creators, it’s possible to marshal the object sending the resulting byte[] and unmarshal the information at the remote server without getting an ClassNotFoundException ?
Best regards,
It’s hard to say for sure what the problem is since you have not yet included any sample code showing how you’re trying to marshal/unmarshall the objects.
That said, Android’s Parceling strategy is not a general-purpose serialization method, so it’s likely this strategy will break — between two devices of different versions, for example. Why not have the object implement both
ParcelableandSerializable, and use theSerializableinterface for the network communications?