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

Error to create parcel on restore instance Android

I have a problem with try to restore instance in my singleton object in Android. I have primitive variable and list of objects. This is my object: String idUsuario, email, idDevice, nombreUsuario, currency; List list; …
Traif
  • 671
  • 2
  • 6
  • 12
0
votes
0 answers

Mixed Parcelable data types in ArrayList as extras

I have a "playlist" that is of type "ArrayList". When going through this list in my code I can easily check to see if it is instanceof Song, Album, Artist, Genre and cast to the correct type. All of the types implement Parcelable in android so they…
Neglected Sanity
  • 1,770
  • 6
  • 23
  • 46
0
votes
1 answer

how to send list object with list in it through parcelable

I'm not able to get list object which has another list in it through parcelable to another activity. Below is my code. SnipDataEvents.java public class SnipDataEvents implements Parcelable { private String…
0
votes
3 answers

What does a CREATOR field look like?

My Parcelable class wants me to include a CREATOR field, but I have no idea what such a field looks like. I have silenced the complaint with SupressLint in the meanwhile but would like to have that CREATOR field. Any idea what it looks…
tore
  • 619
  • 2
  • 9
  • 23
0
votes
1 answer

How do I receive parcelable bundles?

I create a bundle like this: val intent = Intent(classContext, Recipes::class.java) var bundle = Bundle().apply { putParcelableArrayList("LIST", ArrayList(fbModel.recipeArray)) putInt("POSITION",…
tore
  • 619
  • 2
  • 9
  • 23
0
votes
1 answer

How to implement Parcelable

Good day. I need to implement parcelable in Model class.Currently it is Serializable. for now only setdate and set title if thare If any one can help. please edit code. MainActivity.java Document document =…
0
votes
3 answers

Cannot put Parcelable into bundle

My question is fairly simple. I want to pass a List of objects from an Activity to a Fragment thanks to a bundle and Parcelable. Basically, I make a simple retrofit call from the MainActivity, get a List of objects as an answer, then pass it to the…
0
votes
1 answer

issues with parcelable extension: getting unmarshalling unknown type code exception

long story short, I have one settlementItemeBase class as my father and two children. I want to make the father class parcelable so as extension happens, my two child classes be parcelable as well. I don't exactly know what I'm doing right or wrong.…
Athena
  • 302
  • 4
  • 16
0
votes
2 answers

Receiving null Parcelable objects

I have a class that has parcelable implemented and I want to pass it to another activity. This is how I've gone about it public class Result implements Parcelable { public static final String TMDB_IMAGE_PATH =…
0
votes
3 answers

Implementing Parcelable for Date Object - NullPointerException

I am trying to pull the release date value from TheMovieDatabase API. One of the items it returns is a Date value. @Override public void writeToParcel(Parcel parcel, int i) { parcel.writeInt(vote_count); parcel.writeInt(id); …
tccpg288
  • 3,242
  • 5
  • 35
  • 80
0
votes
1 answer

Data parsed from Json cant fetch properly when add another argument in constructor

This is Fist time i'm asking question!! so bear with me. The application is project(popular movie stage 2) from udacity where i need to fetch info of movies like tilte or poster_path or backdrop_path. so when i fetch data from json it works…
Osaf
  • 87
  • 1
  • 12
0
votes
2 answers

How can I pass List from Activity to Fragment

I wanna pass List from Activity to Fragment. But I don't know model class have to implements 'Parcelable' or 'Serializable'. Also How to define implements methods. Thank you for seeing this question. Under codes are my Model class. public class…
Junburg
  • 350
  • 5
  • 23
0
votes
1 answer

Unable to read and write list of double in parcelable

I have a class having list of doubles. My class is implementing parcelable. I am getting no clue how to read and write double as parcelable. Following is my class public class CinemasModel implements Parcelable{ @SerializedName("ll") private…
Naila
  • 270
  • 1
  • 4
  • 26
0
votes
0 answers

How to add custom class to system classLoader?

I have two custom classes: class A: Parcelable{} class B: Parcelable{} When I save and restore them (during rotation) at each place I need set classLoader to Bundle. Otherwise I will get BadParcelableException: ClassNotFoundException when…
0
votes
1 answer

Get elements of ArrayList from retrieved ArrayList via intent via Parcelable in 2nd activity

I'm trying to build a simple android that should simulate learning vocabulary with cards. to get to the final app, I'm going to add functionality and complexity step by step, by learning new things, and adding new things. I'm about to tell you where…
Schelmuffsky
  • 320
  • 1
  • 13