NOTE: the solution is in the answer starting with SOLUTION that I can't accept since it's my own anwer. I hope this helps someone else.
I want to make my class, that includes a parcelable object, parcelable. In other words let's say I have a class with 3 fields: String name, int id and Location loc. Now I want to make this class Parcelable. How can I do it? So far that's what I did:
public MyClass(Parcel in) {
name = in.readString();
id = in.readInt();
loc = in.readParcelable(Location.class.getClassLoader()); }
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
dest.writeInt(id);
dest.writeParcelable(loc, flags); }
When I go to use it I get and error: Class not found when unmarshalling... Does anyone know why I get this error and how to fix it? Thanks in advance for any answer.
EDIT:
I have to add that since I'm sending this data to a service working on his own process I'm using the Handler technique so maybe that could be the problem. But still that method is done well since it was working perfectly until I introduce the Location object in MyClass.