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 object is Null on receiving activity and good in other

Thanks to those who will try to help me! First time I sent a message. I'm stuck with my parcel. I try to send an object Neighbour in a recyclerView for a class DetailedNeighbour. After I send my variable to DetailedActivity.putExtra("DNeighbour",…
Lanfe
  • 1
  • 2
0
votes
2 answers

Getting ClassCastException or IllegalStateException at isSelected

@SerializedName("profileName") private String profileName; @SerializedName("paused") private boolean isPaused; @SerializedName("numberOfDevices") private int numberOfDevices; private boolean isSelected; public Profile(String profileName, Boolean…
Darpal
  • 352
  • 5
  • 20
0
votes
0 answers

android lock main thread after obfuscating app

I created my app and the app is working correctly in debug mode.after obfuscating a part of application that get codes list and shows in recyclerview not working properly in this fragment I am going to get the codes list-codes is my parcelable…
john
  • 345
  • 1
  • 4
  • 20
0
votes
2 answers

Why won't `parcelize` pass data between my custom recycler adapter class and my custom activity class?

I am trying to pass a custom class instance from my custom recycler adapter class to a custom activity class using parcelize but not all of the custom class properties are being passed correctly. The instantiated class properties not being passed…
user7142686
0
votes
1 answer

Parceable error : Unmarshalling unknown type code 7274595 at offset 1112

I go to activity from two fragment and i pass extras through intent the first intent is data Intent intent = new Intent(getContext(), AllAlbumImgActivity.class); photoGrapherSavedPhoto.albumName=getResources().getString(R.string.photos); …
Karim Ata
  • 343
  • 6
  • 15
0
votes
1 answer

Passing Object to new activity return null

This is my intent: Intent intentPay = new Intent(getApplicationContext(), PayScreenActivity.class); intentPay.putExtra(PayScreenActivity.CHAVE_COMIDA, idRestaurante); …
David
  • 1
0
votes
1 answer

how to implement parcelable to ArrayList of Mutable Map?

I have this property in my class that the data type is ArrayList> , but I am confused what should I write in parcel constructor and also in writeToParcel method ? class User() : Parcelable { var uid : String = "" var…
Alexa289
  • 8,089
  • 10
  • 74
  • 178
0
votes
2 answers

How to send ArrayList to other Fragment/Activity without init (start) the next Activity?
I have an ArrayList and I need to send it to another fragment. I tried to use Parcelable, but to send the data I need the "startIntent" method which starts the fragment. I don't want the fragment to be started. I need send data array list object to…
luke cross
  • 321
  • 1
  • 2
  • 19
0
votes
1 answer

Parcelable: Class not found when unmarshalling when calling from different App

I am trying to pass in a bundle from App1 with some data which its data class is Auxiliar to an App2 which also has defined Auxiliar data class but I get the following error: E/Parcel: Class not found when unmarshalling:…
0
votes
1 answer

Why getting wrong value from parcelable when passed with intent to other activity?

I am trying to pass data from adapter to activity through bundle. I am checking a checkbox checkboxSelectSubCategory.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void…
Makarand
  • 983
  • 9
  • 27
0
votes
1 answer

How to implement Parcelable for double ArrayList?

I got a JSON with an array of doubles and another for Strings. I am trying to create a Parcelable model class with the relevant methods. When the methods are created automaticaly, no line for the doubles' array list is created. I looked for relevant…
D. Joe
  • 81
  • 10
0
votes
1 answer

How do you pass elements from an arraylist index using Parcelable?

On a match I need all the elements of an array index passed to another activity. Here's what I have... Intent LocationReview = new Intent(v.getContext(), ReviewActivity.class); // iterate through array for (int i = 0; i <…
c1scok1d
  • 57
  • 1
  • 9
0
votes
1 answer

Null bundle when passing from activity to fragment

When trying to pass a custom object from an activity to a fragment by using a bundle, I kept getting a null bundle when I tried to retrieve it in the fragment. I am using parcels since they are the only option for custom arraylists. Any help…
0
votes
1 answer

write parcelable on enum is crashing the app

This line is dest.writeParcelable(department, flags); causing the app to crash as I parcel the object via the intent. When I comment the line, the app goes through but of course I don't have the department value. public class User implements…
AppDeveloper
  • 1,816
  • 7
  • 24
  • 49
0
votes
1 answer

Is there any way to know what type of object is in a Parcel on Android?

I'm making an Android app which is sending 2 type of objects which implements the parcelable interface (lets call them objectA and objectB) over network as byte arrays. But on the receiving end I need to know which type of object arrived in the…
DaGee
  • 92
  • 1
  • 13