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

Passing array data is null when using Intent

I want to pass an arraylist between 2 activity but I met a problem In FirstActivity the ArrayList is not null but In SecondActivity it's null and I don't know What is happened My Intent: Intent intent = new Intent(mContext,…
Jason Momoa
  • 123
  • 8
0
votes
2 answers

Type mismatch.Required: MutableList>

I'm trying to do expandale recyclerview and I use thoughtbot/expandable-recycler-view, but I've problem with adapter. Maybe someone had similar problem and can help me to solve this problem 1) code of my Parent Class /****** parent ******/ class…
0
votes
1 answer

How to read a MutableList to Parcelable?

I have a class User that implements the Parcelable interface. User also has a property of type MutableList. I would like to know how to read/write this type for Parcelable. Here's my code so far data class User( val contactNumber:…
fishhau
  • 459
  • 1
  • 3
  • 15
0
votes
1 answer

Unable to send parcelable arraylist to service class

I am trying to pass a parcelable arraylist to service which contains image urls. For some reason all data types are passing to service but not parcelable arraylist. An error in logcat is coming as E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!…
Farah Abbas
  • 39
  • 1
  • 10
0
votes
0 answers

How to cast this parcelable array list to an array list of cholesterol monitors which implements parcelable?

I know downcasting isn't allowed in Java but is there a way to cast an array list of parcelable objects into an array list of cholesterolMonitors which implements parcelable? In one of my abstract classes I have: private ArrayList
Sook Lim
  • 541
  • 6
  • 28
0
votes
1 answer

how to add Parcelable Object into Parcelable Object

I must deliver an Object value to other Activity, so I found the way to using Parcelable Object. but this is the problem the outer ParcelableOjbect (I'll call this "1") has inner ParcelableOjbect variable(I'll call this "2"). so what I have to do is…
Jin-guk Park
  • 221
  • 1
  • 3
  • 12
0
votes
1 answer

Android, how is the Parcelable serialized/deserialized, does it maintain the reference to the object instance?

Having a fragment it expects an IDataProvider (which is Parcelable) to be passed in through the Fragment's arguments, and with it to get the data from the repository. this is the DataFragment, which retrieves dataProvider from the arguments via…
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
1 answer

how to avoid getting the "android.os.TransactionTooLargeException"

In the android app there are cases need to pass some data around, crossing activity/fragment, pass to service etc. It has been using the parcelable and put in the intent/bundle. It works fine except get crash on over the one meg limit of the…
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
1 answer

How to exclude autogenerated methods from Parcelable in Jacoco reports?

I'm using Jacoco for creating a test coverage report and I also use the Parcelize Android extension plugin to create the methods needed for the Parcelables. When I create the test reports the auto-generated functions are also appearing in the test…
botflot
  • 275
  • 1
  • 4
  • 9
0
votes
1 answer

How to parcel PagedList<>?

I've got data class that contains variable of type PagedList?. This class needs to implement Parcelable because I want to save its state inside my Bundle. How can I parcel objects of this type? @Parcelize doesn't help. How can I write a custom…
Denathan
  • 141
  • 10
0
votes
3 answers

How to derive from a class which is a parceable

In Android using koltin, having a base class Filters which is a Parceable. It works fine with it. Now need to have a derived class DerivedFilter which overrides the function of getIGenericHandler(). If do not implements its own parceable part, …
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
3 answers

Type mismatch: inferred type is BluetoothDevice? but BluetoothDevice was expected

I know that this is a very simple error but I can't quite comprehend the nuances of kotlin enough to solve it just yet. I'm getting the error: Type mismatch: inferred type is BluetoothDevice? but BluetoothDevice was expected When trying to pass a…
luckyging3r
  • 3,047
  • 3
  • 18
  • 37
0
votes
1 answer

Error while creating Aidl using Parcelable

I am creating an AIDL in this way: I set this 2 files in an AIDL directory: IMDpcService.aidl: // IMDpcService.aidl package amiin.bazouk.application.com.doproject; import amiin.bazouk.application.com.doproject.MBytes; interface IMDpcService { …
Bazouk55555
  • 557
  • 6
  • 24
0
votes
1 answer

Elegant solution for String in Message

I'm writing an Android Service which is intended to be bound by other Applications. It uses a Messenger as IBinder. Now I've stumpled upon a Problem: If I want to send a Message with only a what and a String I originally planned to use Message.obj…
Rafael T
  • 15,401
  • 15
  • 83
  • 144
0
votes
1 answer

Is there a way to make a custom object parcelable when it is constructed using another object?

I'm writing an application to interface with an automotive classifieds API. I want to have two windows: one where the user types in the kind of car they want, and one where the results are displayed. My API returns a large JSON file, on the verge…
Darren C.
  • 63
  • 4