I\'m pretty new to Serializable and Parcelable. I\'m having a hard time passing an instance of this object from an application to a remote service:
public cl
In this method, you never write the Bundle to the Parcel:
public void writeToParcel(Parcel out, int flags) {
out.writeInt(idEvent);
out.writeInt(priority);
out.writeInt(idSource);
out.writeInt(idDestination);
out.writeInt(action);
Bundle mapBundle = new Bundle();
mapBundle.putSerializable(MAP_KEY, (Serializable) data);
// You need to actually write the Bundle to the Parcel here...
}
EDIT Added additional solution to the ClassLoader problem:
Set the classloader in handleMessage()
in your remote service like this:
Bundle bundle = msg.getData();
bundle.setClassLoader(Event.class.getClassLoader());
Event event = (Event) bundle.get(Event.BUNDLE_KEY);