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

Android parcelable error

I'm having a problem with the android parcelable. I am getting this Exception: 01-04 03:21:00.318: ERROR/AndroidRuntime(18973): FATAL EXCEPTION: main java.lang.RuntimeException: Parcel android.os.Parcel@48302ba8: Unmarshalling unknown type…
Vaibhav
  • 435
  • 1
  • 7
  • 11
0
votes
0 answers

Cant get clicked items list from RecyclerView

I'm working on a registration functionality where user can select their skill and skill level based on clicked stars. the backend json file is : "candidate_skill": [ { "skill_id": 1, "skill_level": 4 } …
0
votes
1 answer

Parcel/un-parcel list of instances from base generic class

I have a base generic abstract class, lets call it Base class. This class extended by few subclass, with different types for T mData. Let's say that I have class Sub1 extends Base and class Sub2 extends Base. In addition, I have…
Bak Itzik
  • 466
  • 1
  • 5
  • 17
0
votes
1 answer

Using Android Parcelable with nested objects?

I have a class that I have implemented Parcelable. In that class I am using a list of objects from a jar. I was wondering how I can write that List without being able to implement parcelable on the someObject. Currently my class seems to…
Bobbake4
  • 24,509
  • 9
  • 59
  • 94
0
votes
0 answers

Entity implements Parcelable

I'm a Android Coder,The version of ObjectBox I was using was 3.1.2, and I couldn't make the entity class implement the Parcelable interface. If I did, I would get an error at run time ==> [class not def exception] I want Entity Class in OB can…
0
votes
0 answers

I want to share my recylerview's item's text on social media apps with share button from adapter

I tried several ways but failed. the last try is giving me this error. error: incompatible types: ArrayList cannot be converted to ArrayList shareIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM,myList); public void…
0
votes
1 answer

firestore android adding "stability" field in custom Parcelable class while saving

I have a parcelable class Image @Parcelize data class Image(val id:String="",val url:String=""):Parcelable and for saving in firestore val data = HashMap() data["title"] = "My Title" data["image] =…
BalaramNayak
  • 1,295
  • 13
  • 16
0
votes
0 answers

How can I pass an arraylist that contains a bitmap to another activity in Kotlin?

So this is my class: class Pricecard(val img: Bitmap?, val title: String?, val weight: String?, val price: String?, val code: String?) : Parcelable { constructor(parcel: Parcel) : this( parcel.readValue(), //this is giving an error …
Meo11
  • 3
  • 4
0
votes
1 answer

Best way to make nested custom objects parcelable in Android

There is a lot of information out there concerning Parcelable in Android. After looking around, I couldn't find a nice solution for my problem. So, I need to create a class (let's call it "MyClass") which extends a custom class someone else wrote…
Bashorings
  • 384
  • 3
  • 10
0
votes
0 answers

intent.putExtra with Parcelable comes out NULL for every extra but without Parcelable everything is fine

So the porblem is that I am trying to make a notification for my app and can not find why do I get null all the time! Here is what I do: Intent intent = new Intent(context, NotificationReceiver.class); intent.putExtra("object",…
pumawo
  • 11
  • 3
0
votes
0 answers

grpc-binder: Tried to marshall a Parcel that contained Binder objects

Tried to marshall a Parcel that contained Binder objects. When passing a ParcelFileDescriptor object with Metadata headers, the following error occurred: 41333: 06-04 14:31:22.203 29205 29349 E SerializingExecutor: java.lang.IllegalStateException:…
Seven Sir
  • 3
  • 2
0
votes
0 answers

why writeParcelable and readParcelable messes up the data being passed?

Like the title says, I don't know why when I try passing a object that contains another object that implements parcelable with writeParcelable and readParcelable messed up the data I pass? by messed up I mean. the ID is read by Name, and Name is not…
0
votes
1 answer

Android: Using Parcel to Generate a Deep Copy

I was told that it is possible to create a deep copy of an object by writing the object to a parcel, then immediately reading it out again. So far, I have tried creating a Parcel and writing the object of interest to it as…
Gil Ong
  • 67
  • 1
  • 6
0
votes
1 answer

How to store ArrayList data when screen is rotated?

I tried storing array list data by using serializable and parcelable but in both case when I get the data using getParcelable and getSerializable. I am getting error due to @Deprecated or Type Mismatch. val time1ArrayTennis:…
0
votes
1 answer

Passing vector of Class objects to other activity - in Android

I'd like to ask what I'm doing wrong if I want to pass such data to other class: String [] codes = {"code"}; Class [] classes = { TestActivity.class }; Intent i = new Intent(); Pack p = new Pack(); p.eat(classes,codes); …
Marek Bar
  • 873
  • 3
  • 16
  • 31