I have been using the Serializable
interface to pass an object from one activity to another. I am using putExtra
on the sender side and getSerializable
on the receiver side. Everything works fine but I have received (for the first time) the following error report:
java.lang.RuntimeException: Parcelable encountered IOException reading a Serializable object
I don't understand why this exception has been generated since I am using getSerializable
and not getParcelable
.
I know that I should implement the Parcelable
interface instead because it has been designed specifically for Android (and that's what I will end up doing) but I want to understand why I am getting this error.
Thanks!