I am encountering the following issue:
Let's say I have a RiceContainerClass like so:
public class RiceContainerClass implements Serializable{
private typeOfRice
private countryOfOrigin
...
I am able extend this class, (maybe I want some SteamedRiceClass), but most importantly I am able to pass this class between Activities with my current implementation.
The issue arose when I decided that my Rice class might need to come with a Sauceable Interface.
I wrote the interface:
public interface Sauceable{
public void setTypeOfSauce(Sauce sc)
public Sauce getRiceSauce()
}
(In my program the Sauce is actually a Drawable)
When I modified my RiceContainerClass to implement the Sauce Interface:
public class RiceContainerClass implements Serializable, Sauceable
I get the following error during runtime from the logcat:
java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.example.app.RiceContainerClass)
Any advice on what to do? I tried making the Sauce class extend Serializable, thought maybe that would work to no avail.