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

Parcelable - ArrayList NullPointerException

I'm making my object parcelable so I can use it with Intents. I'm getting a NullPointerException when, once received, I'm reading my object's content. Most exactly the content of my ArrayList. When iterating over my ArrayList it has…
dazito
  • 7,740
  • 15
  • 75
  • 117
0
votes
1 answer

getParcelable returning null in app billing

For some reason, buyIntentBundle.getParcelable("BUY_INTENT"); is returning null meaning my app ceases to function Here is the relevant code: String sku; public void buyHint(){ try { Bundle buyIntentBundle = mService.getBuyIntent(3,…
user3287039
  • 29
  • 1
  • 6
0
votes
1 answer

Send Parcelable object to another activity

I got 3 classes. Series, Season and Episodes. The Series class got a list of Season objects and the Season class got a list of Episode objects. I want to send the Series object to the other activity like this. Intent intent = new Intent(context,…
KyleReemoN-
  • 504
  • 2
  • 8
  • 16
0
votes
1 answer

Retrieve the value of a parcelable objet from the second activity to mainActivity that invoke the second

I have a class that implements the Parcelable class. From main activity, I pass an parcelable object. At the second activity I retrieve the objet and use the objet to change data. All is ok. But the problem is when I need to retrieve this changes…
sandrita
  • 363
  • 1
  • 6
  • 17
0
votes
1 answer

Put parceable in android intent uri

I am trying to put a parceable in an Android intent, and converting the intent to URI. My problem is that the parceable does not show up on the URI. Here is my code: Intent intent = new…
Tiago Veloso
  • 8,513
  • 17
  • 64
  • 85
0
votes
1 answer

How to parcelable a class with an object inside?

I want to make a parcelable class, but one of the variables is another object, so I don't know how to manage this. public class CloseItPending implements Parcelable { @Key int id; @Key CategoryDate date; @Key String…
Víctor Martín
  • 3,352
  • 7
  • 48
  • 94
0
votes
1 answer

Error passing parcelable object using intent

I have written the following class that implements parcelable. package com.example.allinone; import android.accounts.Account; import android.os.Parcel; import android.os.Parcelable; public class WebSiteObject implements Parcelable { public…
Harikrishnan
  • 7,765
  • 13
  • 62
  • 113
0
votes
0 answers

Problems trying use Parcelable between activities

I search everywhere, even in the android webpage, but I didn't found nothing. I'm trying to pass a Arraylist of a class: "ArrayList" from intent a to intent b, but always I have a problem, transfer the data but when the script try to transform from…
tdaniel555
  • 13
  • 4
0
votes
2 answers

Complex Object in aidl file having nested parceable

I have developed one demo for IPC and use bounded servie to handle it....but facing some issue while using complex data structue( i.e. parceable inside parceable). I am having the data structure like this... ObjectX.java public class ObjectX…
SweetWisher ツ
  • 7,296
  • 2
  • 30
  • 74
0
votes
2 answers

Save 2d array of custom object onSaveInstanceState

Hi im trying to save a 2d array of a custom object in a Bundle inside the method onSaveInstanceState so it saves the array of custom objects when the users rotates the screen but i dont know how to achieve it.. If possible id like an "easy"…
0
votes
0 answers

Implementing Parcelable interface in Android

Official documentation and all examples I have seen so far suggest to explicitly write class fields in Parcel object in writeToParcel method and then read them back in constructor which takes Parcel object as an argument. Just experimenting I left…
0
votes
2 answers

Reading ArrayList in Parcelable

I have a class called SuperMedia that implements Parcelable. One of the fields of the class is an ArrayList children. When I create a Bundle and try to pass a "SuperMedia" object from one activity to another, all the fields get passed fine with the…
aafonso1991
  • 142
  • 9
0
votes
1 answer

Acessing object instanciated in an object passed as pacelable with intent

I am quite new to Parcelables and are struggling a bit. I pass an object of class Person which implements Parcelable to another activity using Intent. That works fine, but this object has instantiated an object from the Employer class, and when…
rudder
  • 87
  • 7
0
votes
1 answer

Save custom ArrayList on screen orientation change

I have a ListActivity where the ListView is driven by a custom array adapter which has custom objects in it. The custom object is a Site. On orientation change, my current implementation is trying to hit the database again to populate the ListView…
Alpaus
  • 646
  • 1
  • 7
  • 21
0
votes
1 answer

Can't implement Parcelable if properties of object are non-parcelable?

Let's say I have the following class structure public class SipService implements Parcelable{ public SipCore sipcore; public PhoneRinger phoneringer; public CurrentML currentml; public AManager amanager; //etc... } All the properties of SipService…
John
  • 32,403
  • 80
  • 251
  • 422
1 2 3
99
100