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

ParcelableException: ClassNotFoundException when unmarshalling

I am sending data from one activity to another activity from different packages.I applied intent to send and receive data. For sending single value its working but now I want to send object via intent so I implemented Parcelable but I am getting…
0
votes
1 answer

Sending Parcelable in Intent shows white screen when startActivity called

I am using parcelable to pass data between activities (please don't say it is the wrong method because there is a lot of discussion about that). this is how i capture the image: @Override protected void onCreate(Bundle savedInstanceState) { …
afcosta007
  • 93
  • 7
0
votes
1 answer

Get specific field with parcelable trough activities

I changed my class interface to use parcelable, since i need to pass a object trough some activities to have my work done. So i have implemented a parcelable class(using a plugin that does that) like that: public class Photo implements Parcelable { …
afcosta007
  • 93
  • 7
0
votes
1 answer

How to implement Parcelable object for my class?

I have class which is used to create Client that connects to a Server. It has the following members: public class MyClientThread implements Runnable, Parcelable { private TextView ClientServerMsg; private Integer PortNumber = 4545; …
user963241
  • 6,758
  • 19
  • 65
  • 93
0
votes
0 answers

Intent.getStringExtra() Returns Null for any String that is sent with a Parcelable Object

whenever i try to get the "Hello" or any other type with that parcelable i get it as null , can anyone help ? // intent from current activity to Next Activity Intent intent = new…
0
votes
3 answers

Android - When bundling List use Parceling or Serializing?

How should List be properly passed from the main activity to a secondary activity? From what I understand, there are two ways to bundle data: Parceling and Serializing. What are the pros and cons to each? Thanks
linsek
  • 3,334
  • 9
  • 42
  • 55
0
votes
2 answers

ClassCastException when intercept Parcelable with inheritance

I am working in Android Studio and any time I need Parcelable just auto generate the code. My scenario is that i have super class A and class B extended from class A. I'd like to pass through an intent class B but when I intercept it I get an error…
Choletski
  • 7,074
  • 6
  • 43
  • 64
0
votes
2 answers

How to move data with an Android Parcelable?

I'm making a game, and I need to move a custom Object. To do that, I'm using a Parcelable to move data. However, I'm having problems moving the data, and I don't know why. This is Parcelable class: public class Character implements Parcelable { …
InhoLee
  • 59
  • 6
0
votes
1 answer

How to update model value in android

I am using AutoValue in my models, I want to update the isTrue() value of the model when the user does something. So I need help. Here is my model. @AutoValue public abstract class Xyz implements Parcelable { @SerializedName("isTrue") …
shivam
  • 445
  • 1
  • 8
  • 22
0
votes
1 answer

Filtering custom ListView with multiple TextViews using a Filter on an ArrayAdapter

I have a class class CustomAdapter extends ArrayAdapter, where CustomListItem implements Parcelable, and has 3 String variables (String a, b, c;) Everything is working as intended when loading the ListView. However, now I want to use…
0
votes
0 answers

Sending class object through Activities

I am creating simple Location / Interval Training app for runners. In my main activity (MapsActivity) I am creating object of another class I have created (GPSImplementation). It is getting current location and calculates a few things for a runner…
Łukasz
  • 3
  • 3
0
votes
2 answers

Android put data retrieved from Parcelable into an array

This is an extension of Android implement Parcelable objects with hashmap that contains another hashmap where I was having trouble passing 2 classes between activities using Parcelable. I'm now able to successfully pass both classes together using…
runrmrf
  • 71
  • 2
  • 6
0
votes
1 answer

Transfer objects in model using interface Parcelable

I try to transfer object between activities using interface Parcelable, but I have a problem. If I getting this object model in next activity, fields User and Place equals null, but other fields not null. Can I transfer fields User and Place in next…
Oleg
  • 23
  • 8
0
votes
1 answer

How to pass external object between intents using Parcel

I have custom object named Consts. it's including some informations about user and external library object. I am creating Consts object in LoginActivity after user authentication and I want to pass this object to my MainActivity. How can I pass…
user7690363
0
votes
2 answers

Android Parcelable readStringArray() java.lang.RuntimeException: bad array lengths on Nougat

so the app i am working on ran into an issue, the app crashes only on Android 7 and up. from the logcat the error seems to happen on my parcelable class. here is the point where the crash happens(the class which has the parcelable): public class…
amatsusah
  • 19
  • 3