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

Losing image when going back to activity

I have images in my assets folder which get called to my main activity when I select them in my recycler view activity.I also have a notification action to call back the main activity when needed (to access settings). However, when I call back the…
Code Poet
  • 6,222
  • 2
  • 29
  • 50
0
votes
2 answers

Can't debug a class that implements parcelable

If I have an object called "EditorialCollection" and it implements parcelable why can't I debug into the overrided methods like writeToParcel? protected EditorialCollection(Parcel in) { super(in); //break point here: items = new…
reidisaki
  • 1,525
  • 16
  • 29
0
votes
1 answer

Parcelable objct with another types MPAndroidChart

public class DataForBinding implements Parcelable { // private static final long serialVersionUID = 1L; public ArrayList barEntries; public ArrayList candleEntries; public ArrayList lineEntries; public…
0
votes
0 answers

How to create a dynamic fragment list?

I'm looking to create a simple pc shop ticket system. I have a new ticket activity, a list ticket activity, and an edit ticket activity. The application begins by launching the new ticket activity as shown below To pass data between the new ticket…
s.gang
  • 131
  • 3
  • 14
0
votes
1 answer

Getting a value from an arraylistparcelable

I have a class called public class Contact implements Parcelable { public String id,name,phone,label; In my mainactivity I have public void onActivityResult(int requestCode,int resultCode,Intent data){ …
KourtK
  • 11
  • 1
0
votes
1 answer

Android: how to pass class reference to intent

I would like to pass a class reference to intent in order to have the instance of my class inside the Activity loaded. Please, consider I wrote "reference" to class, so it should not be another instance. Following all instruction I found I'm able to…
Andrea Guglielmi
  • 197
  • 2
  • 15
0
votes
1 answer

How to parcel two object which are in a bidirectional one-to-one relationship?

I have two object like these that I want to send through Intent implementing Parcelable interface: class Foo implements Parcelable { private Bar bar; public void writeToParcel(Parcel dest, int flags) { dest.writeParcelable(bar,…
user5892486
0
votes
5 answers

ArrayList and Parcelable

I need to "transfer" an ArrayList of custom class from one entity to another. I know that I need to implement Parcelable interface. This is my custom class. public class cSportsList implements Parcelable { boolean checked; String name; …
ZioBudda
  • 948
  • 2
  • 12
  • 24
0
votes
1 answer

Android getParcelableExtra object always returns null

So I'm trying to send an object from one activity to another as Parcelable but the object on receiver side is always null. The object is filled completely on the sender side so I'm almost certain it has to do something with reading the object.…
DisplayName
  • 195
  • 1
  • 16
0
votes
1 answer

android - unable to pass parcelable in Intent to another activity

hey i have an issue passing a parcelable POJO to a new activity. I have a listview which lists a bunch of news sources and it works fine. when i click on a item i am passing a parcelable object in the intent and expect in the "DetailsActivity" that…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
0
votes
0 answers

Unable to parcel a list of objects inside a RealmObject

I have a problem in parceling a list of objects inside a RealmObject. I have a RealmObject called Player which extends Parcelable. Every Player has a list of RealmObject Game(s) (more specifically 3 Games). The Game object has fields like score,…
0
votes
1 answer

How can I include a field annotated with @StringDef in a Parcelable?

I have a StringDef annotated interface @StringDef({ SpecialString.A, SpecialString.B }) @Retention(RetentionPolicy.SOURCE) public @interface SpecialString { String B = "BBB"; String A = "AAA"; } Which I use on a field in a…
Nick Cardoso
  • 20,807
  • 14
  • 73
  • 124
0
votes
2 answers

Parcelable class causing "Unmarshalling unknown type code 33 at offset 172" errors after reentering application

I already tried adding this -keepclassmembers class * implements android.os.Parcelable { static ** CREATOR; } to my proguard-rules.pro file as suggested by: Proguard causing RuntimeException (Unmarshalling unknown type code) in Parcelable…
sanic
  • 2,065
  • 4
  • 20
  • 33
0
votes
0 answers

Sending data through activities using Parcelable is not working

I need to send a ArrayList to another Activity, so I create this Activity which implements Parcelable. public class ParceDataImages implements Parcelable { private ArrayList Images; public ParceDataImages(ArrayList images)…
user3796130
0
votes
2 answers

ArrayList storing null Objects?

I am trying to pull some JSON data, parse it and send it as a parameter in order to open this data in a fragment that will display the information. When receiving the bundle object in the fragment I am getting a NULL pointer exception. Trying to…