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
1 answer

Anonymous class as member of class

I have found this in an article. It implements Parcelable for passing data between activities in Android public class Student implements Parcelable { public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { public Student…
Aravind Pulagam
  • 145
  • 2
  • 10
0
votes
0 answers

Parcelable encountered IOException writing serializable object only in some phones

I have this exception in my project in Fragment.java and I don't know what is the problem, because I've already implement Parcelable for MyClass class and should not be a problem with it. Am I missing something? Fatal Exception:…
Hamidreza Sahraei
  • 457
  • 1
  • 5
  • 13
0
votes
2 answers

How to send an object of a model in Intent

I have a model and it implements the Parcelable interface, on my MainActivity I've like this ArrayList modelList = new ArrayList<>(); for(int i = 1; i <= 5; i++) modelList.add(new Model( "name "+ i , "number "+ i)); And I have a ListView of…
Den
  • 283
  • 1
  • 9
0
votes
0 answers

how to properly implement Parcelable with an ArrayList?
I have an ArrayList from my class. I'm trying to pass it through Parcelable, but get an error. Below is the structure of the class and the code itself. How can I pass this type of data? Class class Lists{ String name_opt; byte[]…
Egor Vasilyev
  • 303
  • 2
  • 14
0
votes
0 answers

Parcel Unmarshalling unknown type code when Activity get savedInstanceState

My problem is that when Activity runs into savedInstanceState, it causes the below error: Caused by java.lang.RuntimeException Parcel android.os.Parcel@2c89385: Unmarshalling unknown type code 7929970 at offset 132 In my project, there are only…
0
votes
0 answers

How to send an object from one activity to another activity by using putExtra()?

I tried to do it with the parcalebe method but i cant figure out how to use it with a geopoint. This is the object im trying to send. Any help would be appriciated. public class Station implements Parcelable { private String description; …
0
votes
1 answer

intent send pojo object in second activity, in second activity object get but object inner list return null

i heve one pojo class name contact i open new activity for edit it using this Intent iEditContact = new Intent(JsonParseActivity.this, EditContatctActivity.class); iEditContact.putExtra(Constant.intent_key_edit_contact, contact); …
BiRjU
  • 733
  • 6
  • 23
0
votes
3 answers

intent send pojo object in second activity, in second activity object get but , inside object inner list return null

i send my pojo object using intent from one class to another its successful send and successful retrieve from another class but when i check inner data from retrive pojo my inner arraylist name links and phone returns null; i dont know why because…
BiRjU
  • 733
  • 6
  • 23
0
votes
1 answer

How would I save and load on object on android when using parcelable?

public class Expense implements Parcelable, Serializable { private String _amount, _amountVat, _dateOfExpense, _dateAdded, _datePaid, _expenseDescription; private Boolean _paid; private Bitmap _imageBitMap; public Expense(){ super(); } This is…
KPullet
  • 21
  • 3
0
votes
3 answers

Parcelable out of memory

Suppose we have a list of complex objects (primitives and other objects inside) requested from a server to show them inside a RecycleView. In adapter we need only some data from each object, let's say 70%. I get from server list with full data…
Choletski
  • 7,074
  • 6
  • 43
  • 64
0
votes
0 answers

Is Android Parcelable leaking when put into Intent?

I wrote a Parcelable class and out of curiosity I wrote some debug output whenever it is created and whenever the finalize() method is called. The Parcable is put as Extra into an Intent that is used to start an Activity. Now I see the following:…
Mani
  • 51
  • 4
0
votes
0 answers

Retrofit returning 200 OK and the correct JSON, but parcelable is getting null

I'm doing the following call: @GET("request/view/{requestId}.json") Call visualizar(@Path("requestId") Integer requestId); Which is returning 200 OK and the expected JSON: { "id": 12227, "responsaveis_ID": 2657, "horario":…
gbruscatto
  • 686
  • 7
  • 21
0
votes
1 answer

Android app crashes when I quit the app if Parcelised data has been used at some point, even though that data was successfully Parcelized

I have a strange crash on both the Genymotion Android simulator and my Huawei Nexus 6P. I have a screenshot that I am sending to another Anko Component successfully - obviously it is Parcelable: @Parcelize data class ColourBoardScreenShot(var…
Dave Chambers
  • 2,483
  • 2
  • 32
  • 55
0
votes
2 answers

Error passing ArrayList of parcelable object

I have a strange error in my app on Android Studio trying to pass ArrayList of parcelable objects between activities. It's possible to pass the objet Task but impossible to pass an ArrayList of task with putParcelableArrayListExtra. I have this…
augustin
  • 69
  • 5
0
votes
0 answers

Sending Object Between Fragments Using Parcelable

I am trying to pass a custom object along 3 fragments. I implemented the Parcelable Interface to the class of the object and can retrieve it from the database etc. However, I noticed, whenever I pause the app, eg open another application on my…
Vr33ni
  • 101
  • 16