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
2 answers

ArrayList null when building Parcel

One of my classes has 3 properties ArrayList like this: public class Product implements Parcelable{ // other properties private ArrayList categoryIds; private ArrayList categorySlugs; private ArrayList
Alberto Garrido
  • 485
  • 2
  • 6
  • 15
0
votes
2 answers

Pass Object implementing Parcelable from one Activity to Another Activity

I have reviewed similar questions on SO but I have not achieved the required result I'm pulling data from the Movie Database server, I'm parsing that data using Jackson and I'm creating this object on which I need to implement parcelable as in my…
DJ-DOO
  • 4,545
  • 15
  • 58
  • 98
0
votes
1 answer

Parcel android.os.Parcel Unmarshalling unknown type code 7209057 at offset XXXX in Android

I have two differents devices : Phone Sony Xperia SP Android v4.3 Tablet Archos 101 helium Android v4.4 When i start my app on the tablet, it's work perfectly. So i try to launch my app on my the other device(Sony). On this device i have an error…
Slasch
  • 275
  • 1
  • 6
  • 20
0
votes
1 answer

Android | java.lang.RuntimeException: Parcel android.os.Parcel@1219dd0f: Unmarshalling unknown type code 6881396 at offset 660

Please help me how to solve this issue ? Parcelable interface i was implemented in customer pojo object. please help me how to read customer object in activity 2 ? Customer.java public Customer implements Parcelable{ private String name; …
nag
  • 647
  • 6
  • 25
  • 43
0
votes
1 answer

Using android Parceler library with minifyEnabled

Whenever I try to minify my project that makes use of the parceler library, I cannot build a release apk because of a lot of warnings from proguard. For example: Warning:org.parceler.transfuse.gen.FilerResourceWriter: can't find referenced class…
flower_green
  • 1,314
  • 2
  • 25
  • 30
0
votes
2 answers

Writing an enum to a Parcel causing RuntimeException

I just posted this question and someone suggested that I should look at another answer. In the other answer, it told me to put the enum into the parcel as a Serializable. (And if you don't now what I am talking about, read the post above.) I tried…
Sweeper
  • 213,210
  • 22
  • 193
  • 313
0
votes
1 answer

android Parcelable when sending object over network

I have a object i want to send over the network in a file to a java servlet. My object looks like this: public class MYPOJO implements Serializable { int myint; String mystring; } i read its not recommended to use Serializable in Android…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
0
votes
1 answer

How to measure speed of parcelable vs serializable

I need to perform a metric measurement on the speed of serialization vs parcelable in Android. I have a very large POJO object that gson converts to JSON and vice versa. But my superiors would like a metric to determine if converting our…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
0
votes
1 answer

Unmarshaling exception in parcelable object

I have a problem with unmarshaling an parcelable object. The exception is not reproducible every time but sometimes yes. Here is the definition of the parcelable object : public class Article extends DBOperationHolder implements Parcelable…
user1106234
  • 223
  • 4
  • 15
0
votes
1 answer

Question about parcelable object

I want to save a list of Parcelable Restaurant objects on onSaveInstanceState. I created a Restaurant class extending Parcelable and a RestaurantList object, both shown below. In my main activity I fill my RestauranList directly from json internet…
jul
  • 36,404
  • 64
  • 191
  • 318
0
votes
0 answers

What is the best way to encapsulate many objects into a Marshalling object in Android, such as a bean?

Normally in Java I would encapsulate many objects into a serializeable bean. Then work with the objects stored in the bean, and pass the bean around my application. https://en.wikipedia.org/wiki/JavaBeans The problem is that a lot of google's…
UEFI
  • 243
  • 1
  • 2
  • 10
0
votes
1 answer

Android Parcelable Unmarshalling prob

I have two class named AlacarteCategory and AlacartePack Class AlacartePack public class AlacartePack implements Parcelable { private int alacartePackId; private String alacartePackName; private double price; private String…
dev_android
  • 8,698
  • 22
  • 91
  • 148
0
votes
1 answer

How to send a Surface object (or some representation of it) over a network

I have a Surface object in Android containing screen data. From what I understand, it is sort of a handle onto a frame/pixel buffer. How can I send this object (or some representation of it) over a network to, say, a web server?
SasukeIsCool
  • 227
  • 4
  • 11
0
votes
2 answers

Android: How do I correctly implement Parcelable for Objects with ArrayList with custom types?

EDITED TO REFELECT qbix's answer I have a class which holds data and is used for passing around data between activities. It has a couple of fields, mostly String, but 2 more fields which are of type ArrayList and another ArrayList When I try to get…
mrd
  • 4,561
  • 10
  • 54
  • 92
0
votes
1 answer

DTO-s with less boiler-code for Intent/Parcable/Bundle/SharedPreferences possible?

I have an app that uses a DTO class MyAppData with 21 attributes to be transfered via Intent via Parcable between activities, saved/restored via Bundle in case of rotation and persisted via SharedPreferences(.Editor) if the app is restarted…
k3b
  • 14,517
  • 7
  • 53
  • 85