I need to send an object ModuleDetection
from an activity to another. I've found that using the Parcel
class to turn my object into a Parcelable
object would help me. However, in every example I could find, the parcelable object's attributes had default types of Android. But the ModuleDetection
object has an attribute of ImageInterface
type, another class that I made.
When writing the method :
@Override
public void writeToParcel(Parcel dest, int flags) {
}
I can't use methods like dest.writeInt()
or dest.writeString()
, because my attribute hasn't a default type of android. How can I do this?