Questions tagged [parcelable]

parcelable refers to the capability of an object to be converted to a parcel, a container for reading and writing data of various type, using type specific rather than generic serialization

parcelable is defined in the Android API as as interface for classes whose instances can be written to and restored from a parcel

References

1664 questions
0
votes
0 answers

Should I use Parcelable in this use case?

I'm developing an Android app. I have this domain class: public class Film implements Parcelable { private List listeners; //more members } I'm showing a films list and each item has a button to mark/unmark a film as…
Héctor
  • 24,444
  • 35
  • 132
  • 243
0
votes
0 answers

App crash when sending large data to Activity

I am trying to send List[CustomObject] from one activity to another . The data - http://www.giantbomb.com/feeds/news/ is around 270kb . When i send only 3-4 (maybe more) elements of the custom list then second activity start without any problem .…
randy
  • 765
  • 7
  • 24
0
votes
1 answer

Unable to get Parcelable list in a bundle in another activity

What I want is to pass a list of list from one activity to another. Here is my approach. Feeditem.java public class FeedItem implements Parcelable { private String id,status, image, timeStamp, url; private ArrayList
0
votes
1 answer

Android: Loop for is getting java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast

When I'm trying to iterate by "loop for" is resulting a Fatal Exception: java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to br.com.gerticonsultoria.easyrentrider.model.ChatUser at…
Almeida
  • 1,254
  • 12
  • 26
0
votes
0 answers

Android Parceler Library - java.lang.RuntimeException: Parcel: unable to marshal value

I am trying to use the Parceler library for Android. http://parceler.org/ However I am getting the following error when trying to use it on a couple of my Java objects, this is the error I am getting: java.lang.RuntimeException: Parcel: unable to…
Donal Rafferty
  • 19,707
  • 39
  • 114
  • 191
0
votes
1 answer

Using Parceler library with Serialization

I want to use Parceler library with Serialization. This is what I have now without using this library: public class Venue { @SerializedName("id") String venueID; @SerializedName("name") String venueName; @SerializedName("url") String…
MikeB
  • 257
  • 1
  • 4
  • 15
0
votes
1 answer

Android Parcelable with Tree of Generic Types

How to write Parcelable for a tree like structure that has a Base class with two implementations, one a Node type and the other a Container Type which contains a list of Base types. Sorry for the mass of code below. The basic data structure is…
fergdev
  • 963
  • 1
  • 13
  • 27
0
votes
3 answers

How to implement the write & read in Parcelable Class

Parcelable I have this Player Class: public class Player implements Parcelable { private String mName; // Player's name private Card mCard; // Player's current card private boolean mLifeStatus = true; // Player's life status private boolean…
FET
  • 942
  • 4
  • 13
  • 35
0
votes
0 answers

Dynamic parcelable createTypedArrayList

I'm trying to make a function to make parcelable classes dynamically. But when I reach an ArrayList I can do dest.writeTypedList() buen when reading it if the array is null it gives me an exception that says android.os.BadParcelableException:…
0
votes
2 answers

I am getting java.lang.runtimeexception parcelable encountered ioexception writing serializable object

I am newbie to android and working on a demo app with two screens to pass a data from one to another activity, During this i am getting below exception, java.lang.RuntimeException: Parcelable encountered IOException writing serializable object…
sulphuric Acid
  • 585
  • 6
  • 23
0
votes
2 answers

Use LocalBroadcastManager to send PendingResult reference (for ordered broadcasts)

I want to send a PendingResult via a LocalBroadcastManager since ordered broadcasts doesn't seem to be supported with LocalBroadcastManager. Can I make a wrapper object that implements Parcelable, which contains a memory reference to a PendingResult…
JohnyTex
  • 3,323
  • 5
  • 29
  • 52
0
votes
0 answers

how to send parcelable class in android

I have gone through a lot of solutions on SO. But none of them work for me. I am simply trying to send a parcelable class from one Activity to another using Bundle bundle = new Bundle(); bundle.putParcelable("parcelableMovie", (Parcelable)…
zohaib
  • 11
  • 2
0
votes
3 answers

How to pass ArrayList of object between activities using Parcelable?

I want to send array list of object from one activity to another. For this I have extended my class with Parcelable. Still I am not getting the list. Also I have sent a boolean variable for that also value dose not get change. My object…
user6265109
0
votes
0 answers

How to write an array list of array list of an object to parcel?

I have this ArrayList private ArrayList>schedule; So each element of this array is another array list of my custom object How would I go about writing this to parcel? This is my initial approach but wondering if there is a…
Ersen Osman
  • 7,067
  • 8
  • 47
  • 80
0
votes
2 answers

How to pass an object in android if the object has a non primitive property (parcelable)

I have this object "Table" (as in restaurant table) which implements parcel able but has an object property "Bill". I need to pass this object to another activity but I can't write the object like I do with string or int how do I implement the…