save - Implementing both Serializable and Parcelable interfaces from an object in Android - conflict -
i have object must save file reuse. class of object implements parcelable
use in intents. knowledge of saving object file says implement serializable
, when do, error in class contains object @ putextra
method of intent because both serializable
, parcelable
have method.
is there way avoid this, or way can save object state , reload easily?
i have looked @ few articles , feel no more informed how should saving object. in advance
i believe parcelable
, serializable
both reaches same goal in different ways , different performances. given that, if class in object hierarchy alread implements parcelable
interface, can override writetoparcel
method, call super (so members of super classes written parcel if implement way) , then, should write attributes parcel, keeping in mind order use save them order use retrieve them latter (filo data structure)
edit
just cast object complains , tells conflict class want use described here: https://stackoverflow.com/a/13880819/2068693
Comments
Post a Comment