I am implementing the DataDroid model of RESTful communication and I have come across a compiler error while implementing my SearchCriteria
. The problem is that in order to pass the SearchCriteria
around as an intent extra, I had to make it implement Parcelable
. However, my Worker
's start
function requires a SearchCriteria
class, leading to the error: Required: my.classes.SearchCriteria; Found: android.os.Parcelable
.
Assuming that I've correctly implemented Parcelable
for my SearchCriteria
class, how can I quickly create an object from a parcel (where the parcel is found using getParcelable Extra(INTENT_NAME)
?
Edit: I realize I can accomplish this quickly by making my constructor for Actually, this does not work - I confused a SearchCriteria
from Parcel
public, but is there another way?Parcel
with a Parcelable
thing.