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

Parcelable overload resolution ambiguity

I am trying to create a POJO (aka data classes in Kotlin) structure of a JSON response in Kotlin. I've implemented the Parcelable interface for each data class in the structure. In all of the data classes, I've auto generated the Parcelable…
rj2700
  • 1,770
  • 6
  • 28
  • 55
0
votes
0 answers

Unexpected behavior when passing parcelable data to other activity from an adapter

I have an Adapter which uses some custom object list. I wanted to pass the clicked object's to the other activity. So I made the object class implement Parcelable. To send the data from the…
user11248783
0
votes
1 answer

Unexpected behavior in Kotlin Parcelize

I am having trouble in understanding the way @Parcelize working in Kotlin. According to documentations only the primary constructor properties will be serialized. But when I serialize and deserialize classes with empty primary contractors, it is…
musooff
  • 6,412
  • 3
  • 36
  • 65
0
votes
1 answer

Arraylist only retrieves the last value

Hi I am passing an arraylist from one activity to another using Parcelable.. Now the problem is that when I click on BILL, all the rows are populated with the last value of the arraylist..So I guess I am not able to retreive the whole arraylist in…
Lakshay Gupta
  • 73
  • 1
  • 3
  • 9
0
votes
1 answer

Android TransactionTooLargeException when passing a Parcelable ArrayList

I'm developing an Android quiz application (I'm a beginner). So I have an Abstract class Questions and three subclasses for types of questions (multiple answers, question with image and true / false questions). I read my questions from three…
user11170181
0
votes
1 answer

Utilising Parcelable to send Array across two activities

I'm trying to send a populated array of a created class called 'Exercise' between two activities, and I've read the best way to do so I utilising the Parcelable class. Activity 2 crashes whenever it starts. I've followed tutorials online for this…
Liam_Foth
  • 13
  • 2
0
votes
1 answer

How to parcelize Google's Place class?

in my custom object, i have 7 attributes, 5 of them are strings, and were auto genereated in the contructor fine, but the other two did not generate automatically. the last two are of class Place and ArrayList: class Spot() : Parcelable{ …
Barcode
  • 930
  • 1
  • 13
  • 31
0
votes
0 answers

How to pass 2D array of parcelable objects (T implements Parcelable)[][] between activities?

How to send an 2D array of parcelable object into another activity through intent? Any help? Here is my Parcelable custom Object: public class PTagData implements Parcelable { public int mStartWordIndex; public PTagData(int startWordIndex)…
hamid
  • 97
  • 1
  • 9
0
votes
1 answer

Sending image from drawable to another app/service

I have a central application which is going to receive messages from various services and construct dynamicaly a notification (up to 3 or 4 informations from the services in the notification). Part of the personalized notification will include…
parphane
  • 152
  • 2
  • 12
0
votes
1 answer

Parcelable Map proper way?

I m using a Map of String and Pojo. I m implementing Parcelable in that class. To generate parcelable I m using plugin Android Parcelable code generator by Michal Charmas. It's working fine for everything else, but not for Map. Here…
Nouman Ghaffar
  • 3,780
  • 1
  • 29
  • 37
0
votes
1 answer

Using parcelable pass data got java.lang.ClassCastException after clearing ram

I implements two classes to the Serializable and Parcelable. The data class like this,the details of Serializable and Parcelable are nomitted. public class Test1 implements Parcelable { public Test1() { } String s1; String s2; String s3; String…
mark
  • 133
  • 1
  • 7
0
votes
1 answer

I need to create a list based on the results of an ifStatement

I have a question for you. I have a situation where a list will be generated based on the results of an ifStatement. My ifStatement is based on whether a checkbox is checked. If it is, I want a variable (let's say, the time) stored somewhere until…
Dr_GeoFry
  • 1
  • 2
0
votes
3 answers

How to make an arraylist of arraylists parcelable in android

My problem is that I have an arraylist of arraylists with custom objects that needs to be passed from one activity to another. Clearly, let's say I have something like: ArrayList> data; in one activity and I want to pass it…
ebeninki
  • 909
  • 1
  • 12
  • 34
0
votes
1 answer

How can I parce a List in Kotlin?

I'm trying to parce a list of Int. I've tried this solution: How to parcel List with kotlin, but not worked data class Pizza( var ingredients: ArrayList, val name: String, val imageUrl: String ) : Parcelable { constructor(parcel:…
Wellington Yogui
  • 371
  • 3
  • 18
0
votes
1 answer

In kotlin how to make a derived class from a Parcelable parent (and has implemented a nested Builder class)?

Having a base class (which is Parceable) using Builder pattern, now would like to create a child class derived from it so that override the default customFunc_1 and customFunc_2 function implementation. If simply deriving from the base…
lannyf
  • 9,865
  • 12
  • 70
  • 152