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

Inheritance of TestCases on Android

I was wondering if it was good practice to subclass the test cases on Android. I mean, I need to test a lot of Parcelable objects and I could create a class like GenerericParcelableAndroidTestCase to test all these objects. I also have a problem…
Laurent Meyer
  • 2,766
  • 3
  • 33
  • 57
0
votes
1 answer

RuntimeException: Parcel: unable to marshal value android

I want to send model object to another activity,which contains list refer to another model public class row_my_bookings implements Parcelable { String BookingID; ArrayList list_of_mainservice; public…
Shruti
  • 391
  • 1
  • 5
  • 21
0
votes
2 answers

Android: Error at passing a Parcelable object to another Activity

I'm trying to pass one object from my MainActivity to another. It has an atribute of the type ArrayList which is changed and I don't know why. In the MainActivity I use object's toString and System.out.println() to see what he has and I can see…
Euskalduna
  • 1,517
  • 2
  • 13
  • 12
0
votes
1 answer

Can't Pass Parcelable via Intent

I have two activities: ListViewActivity AddActivity and one object class : todoObj I have a list view in my ListViewActivity activity and when I click add button this will initiate AddActivity . In AddActivity when user enters Title, choose…
Recomer
  • 178
  • 2
  • 12
0
votes
1 answer

Passing ArreyList between Fragments with Parcelable

After consuming a json with Retrofit and using unsynchronous callback I can't pass An ArrayList from The MainActivity to a fragment . Code from MainActivity: lFragmentManager = getFragmentManager(); lFragment =…
VasFou
  • 1,561
  • 1
  • 22
  • 39
0
votes
2 answers

I send an parcelable class from Android ActivityForResult and receive null

Sorry for common question, but I check all and can't find error. I send class from Activity and receive NULL. Checking after creating Intent is correct (readbackCi in my code). Could you please help me find solution? My class CityItem import…
Oleg Ushakov
  • 1,200
  • 14
  • 27
0
votes
1 answer

How to send data using putExtra of the an Adapter Class to a new Activity

I have a problem to send data using putExtra (of the a Adapter Class to an new Activity). I think that my problem is in Parcelable, but I cannot find where there are the problem. Follow my class for you understand better. Consultorio.class public…
André Vitor
  • 59
  • 1
  • 13
0
votes
2 answers

Android Parcelable JsonArray in Side JsonObject

When i am trying Parce this json data with GSON. I am unable to get JsonArray in side of JsonObject. Below is my code, every suggestion will get appriciated. JSON DATA FROM SERVER : { "GetJobDetails": { "MaxAmount": 0, "CreatorId": 1, …
Guruprasad
  • 931
  • 11
  • 16
0
votes
1 answer

How to send Parcelable Object that contains doubly nested Parcelable arrays

I am trying to write an object in my startup activty to Parcel then send it to my Main activity using an intent. However I get a null pointer exception when retrieving the ParacelableArrayExtra in my Main activity. So i put in a check for null to…
user4956079
  • 21
  • 1
  • 4
0
votes
1 answer

Why using Parcelable/Serializable when passing data between activities

I have a question, why we using Parcelable/Serializable when passing data between activities. As I read in the documents around internet, Parcelable/Serializable is used when we need to pass data between processes. But all the activities of the same…
Nguyen Quang Anh
  • 315
  • 1
  • 3
  • 12
0
votes
1 answer

How to read from parcel

I thought I understood how to read/write from a parcel, but now I'm getting stuck. In one of my parcelable objects, I have this function @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(7); int testInt =…
Noah Santacruz
  • 460
  • 1
  • 3
  • 18
0
votes
1 answer

Parcelable Array List does not working

I have a custom object and an Array List, I get a null exception when i try to retrieve a parcelable Array List. The code from the custom object: public class Patient implements Parcelable { private String fullName; private String id; // this is…
VasFou
  • 1,561
  • 1
  • 22
  • 39
0
votes
2 answers

I am getting an error while retrieving the Bitmap file using getParcelable in android

I am trying to get my Bitmap file which I have passed into an intent but getParcelable() method return null everytime. following is my java code where I am sending my Bitmap image in intent: Intent cameraIntent = new…
user3971448
0
votes
1 answer

Writing data with Parcel Object

I am having some hard time trying to figure out how to write data with a Parcel object, I am new using this class and I've been doing some research but don't understand how to, here is the parcelable class public class Item implements Parcelable…
Jhonycage
  • 759
  • 3
  • 16
  • 36
0
votes
0 answers

Parse.com retrieve list of images

Here is my class that works with parse.com API. public class ListActivity extends AppCompatActivity { RecyclerView recyclerView; LinearLayoutManager manager; List recipes; static int count = 0; private…
Void
  • 1,129
  • 1
  • 8
  • 21