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

Android Parcelable Class - Inner classes cannot have static declarations

I've been trying to create an Android Parcelable object but keep running into the error "Inner classes cannot have static declarations". For reference I have been looking at the official Android tutorial located here. My current code is as…
jProg2015
  • 1,098
  • 10
  • 40
0
votes
1 answer

Parcelable object caching

I'm designing an app using NFC on Android.When a tag is read, the system sends to an activity a Tag object. The Tag object is a Parcelable object. Since I want to write later on this tag according to user settings, I need to "cache" this object in…
greywolf82
  • 21,813
  • 18
  • 54
  • 108
0
votes
1 answer

How to save object (Bitmap image loaded from gallery and string)in gridview?

public class MyObject implements Parcelable{ Bitmap image; String title; @Override public int describeContents() { return 0; } I dont understand how to make parcelable right yet @Override public void writeToParcel(Parcel…
Chickin Nick
  • 517
  • 1
  • 6
  • 21
0
votes
0 answers

android app set control value of Fragment ParcelableArrayList

Help me Everyone, I can get a ParcelableArrayList of Fragment, but cannot get value of Control in onCreateView() How to set value to Control object? public static class ArrayListFragment extends Fragment { int mNum; int mSEQ; String…
0
votes
0 answers

Android: Storing ArrayList>

Is there a short easy way to store/recall an arraylist of an arraylist? Currently, I have an ArrayList. I was able to successfully use outState.putParcelableArrayList to store an ArrayList with the onSaveInstanceState. However, the arraylist of an…
lclankyo
  • 221
  • 3
  • 10
0
votes
1 answer

Unable to read a parcelable object within another parcelable object

I have a class for Prescriptions which has fields for Medication, Doctor, and Pharmacy. Each of those classes implement Parcelable so that they can be passed inside of a Bundle. For Medication, Doctor, and Pharmacy, I don't have any trouble.…
AdamMc331
  • 16,492
  • 10
  • 71
  • 133
0
votes
1 answer

Parcel Unmarshalling, Runtime Exception is thrown

I tried to make an app that would display the periodic table and then you could click each element to take you to another screen to see its molar mass. From there you can go to another screen. The problem is that whenever I click on an element,…
Jade
  • 71
  • 1
  • 12
0
votes
1 answer

Object not Parcelable? Alternatives?

I have a class/object which I'm attempting to make Parcelable so I can save the object to a Bundle (Well, in fact, I will add the object to an Arraylist and then save this list to, and restore it from a Bundle, complete with the objects held within…
Zippy
  • 3,826
  • 5
  • 43
  • 96
0
votes
1 answer

Android save Activity state in Parcelable class object

in my application i many onSaveInstanceState in each activity and file, now after reading this link to create Parcelable class i can not use that and save into this class default onSaveInstanceState is: @Override public void…
DolDurma
  • 15,753
  • 51
  • 198
  • 377
0
votes
1 answer

Android - Not able to get object modified from ListView

My Radio_Cabinet_Defect_Activity: public class Radio_Cabinet_Defect_Activity extends Activity { private ListView mList; private CabinetDefectAdapter mCabinetDefectAdapter; private RadioSiteSubsection mRadioSiteSubsection; …
0
votes
1 answer

Parsing Exceptions between Activities in Android

That's my question more or less... I've got a class that extends from Exception and I need it to be inserted in a parcel. How can I achieve that? public class Result implements Parcelable { public Result(UserException exception){ …
Sonhja
  • 8,230
  • 20
  • 73
  • 131
0
votes
1 answer

Share large data amount between activities

I have a parcelable class that is trying to send some camera preview information. So I need to send several byte[] data from one activity to another. I'm using Parcelable with this code: public class CameraResult implements Parcelable { …
Sonhja
  • 8,230
  • 20
  • 73
  • 131
0
votes
1 answer

Array of Parcelable objects that each contains a few strings and ArrayList of parcelable objects

Hey guys im having alot of troubles getting the following code to work. I am trying to setup an array of parcelable objects named Topic which each contain 3 strings and an ArrayList of Issue objects that are created by parsing an XML file. The issue…
Jaison Brooks
  • 5,816
  • 7
  • 43
  • 79
0
votes
2 answers

How can i transfer ArrayList between Activities?

I'm trying to transfer ArrayList between activities, but nothing I've tried works as well. This was my best shot, but this didn't work either. I'm calling the external action here: getComics getComicInfo = new getComics(charName,…
Aviv1002
  • 13
  • 4
0
votes
0 answers

bundle putParcelable doesn't work

If I only do this: bundle.putParcelable(User.TAG, user); and User user = (User) bundle.getParcelable(User.TAG); It works but if I do this: bundle.putString("refer_key", "value"); bundle.putParcelable(User.TAG,…
Gary
  • 1
  • 1