I have the following in a class that is implementing Parcelable:
private static final long serialVersionUID = 66;
private HashMap<Integer, Bitmap> mBitmaps;
private HashMap<Integer, Drawable> mDrawables;
private Context mContext;
And:
@Override
public void writeToParcel(Parcel dest, int flags) {
// TODO Auto-generated method stub
dest.writeValue(mBitmaps);
dest.writeValue(mDrawables);
dest.writeValue(mContext);
dest.writeByte((byte) (mActive ? 0x01 : 0x00));
}
I get the error:
java.lang.RuntimeException: Parcel: unable to marshal value android.app.Application@4051cfe0
at android.os.Parcel.writeValue(Parcel.java:1132)
at com.example.example.ImageManager.writeToParcel(ImageManager.java:82)
dest.writeValue(mContext); is on line 82.