If you are implementing Parcelable , you need to have a static Parcelable.Creator field called CREATOR that creates your object - see doco RE createFromParcel ()
public static final Parcelable.Creator<MyParcelable> CREATOR = new Parcelable.Creator<MyParcelable>() { public MyParcelable createFromParcel(Parcel in) { return new MyParcelable(in); } public MyParcelable[] newArray(int size) { return new MyParcelable[size]; } };
Then, in your constructor that takes the package, you need to read the fields that you wrote in the same order.
The package has a method called readMap (). Note that you need to pass the class loader for the type of the object in your HashMap. Since yours keeps doubling, it can also work with null passed as ClassLoader. Sort of...
in.readMap(historicFeedData, Double.class.getClassLoader());
source share