I have a class that implements Parcelable and and that class also has a member: public Class<?> _type;
I can’t seem to figure out the correct way to preserve this value when implementing public void writeToParcel(Parcel dest, int parcelableFlags) and private Interface(Parcel source).
Does anyone know the proper way to write/read it?
I think you would have to write out the class name on the sender side, and then use reflection to look up the class on the receiver side. This obviously won’t work if the class in question isn’t available when de-serializing the parcel.