Closed andresmafra closed 10 years ago
It seems to be a known issue with custom parcelable used in intents.
http://stackoverflow.com/questions/2307476/classnotfoundexception-when-using-custom-parcelable https://code.google.com/p/android/issues/detail?id=6822
We will investigate a workaround for this.
I´ve tried the comment on https://code.google.com/p/android/issues/detail?id=6822 but it doesnt worked. Have you another WA? Thanks!
UPDATE:
I think this explanation is more appropriate for the error on SDK:
http://stackoverflow.com/a/18126250/1442795
Maybe we need to implement this on the following code (java com.baasbox.android.json.JsonArray
)?
//OLD
JsonArray(Parcel source) {
this();
source.readList(list, null);
}
//FIX
JsonArray(Parcel source) {
this();
source.readList(list, getClass().getClassLoader());
}
What do you think about?
As a workaround Im using the utility methods on the SDK:
encode()
decode()
This format the return of JsonObject in a String and so i can pass it to the activity(using the serializable behavior). Of course serializable has a loss of performance, but for a WA is acceptable.
Thanks for the suggestion, we'll try and test if the fix works. If so it would surely be in the next release.
Im getting the following exception while reading the JsonObject after I insert it on new Activity Bundle:
android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.baasbox.android.json.JsonArray
The code for put the bundle:
The code for retrieve the values: