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

Attempt to invoke virtual method 'android.os.Parcelable android.os.Bundle.getParcelable(java.lang.String)' null object reference

I am making an app in which a feature that user can upload images and video to server it was working well on activity but now I want to use it in a fragment. I try to code effectively, efficiently and I am not getting any error during compiling and…
Ali Imtiaz
  • 21
  • 1
  • 4
0
votes
1 answer

Serialize realm object using Parceler library

I'm using Parceler library for serialization in my project. I have a RealmObject class like this: @Parcel(implementations = {ARealmProxy.class}, value = Parcel.Serialization.BEAN, analyze = {A.class}) class A extends RealmObject { public int…
Hojjat
  • 815
  • 1
  • 10
  • 25
0
votes
1 answer

I can't read property of an object passed between two android activities by using Parcelable

This is the class that implements Parcelable: public class MyUser implements Parcelable{ private String userName; private String password; MyUser(String u, String p){ userName = u; password = p; } private…
Donovant
  • 3,091
  • 8
  • 40
  • 68
0
votes
2 answers

Parcelable array saveState wrong argument

I have a problem with orientation change andloss of data in my fragment. So basically I have a parcelable class and array of that class, but for some reason it gives me an error: Parcel class: public final class WeatherData implements Parcelable…
hyrulelink16
  • 389
  • 1
  • 5
  • 17
0
votes
0 answers

Parcelable error Attempt to invoke virtual method on a null object reference

I am trying to use parcelable to make a simple edit form. The data was received from an array list. But, when I try to run it, there is an error: Attempt to invoke virtual method 'int com.insiteprojectid.practiceadapter.user.Student.getId()' on a…
0
votes
2 answers

Android:lossing data when pass arraylist of arraylists from activity to activty

i could to pass an arraylist from activity A to Activity B Successfully. AS Shown below : At activity A : Intent intent = new Intent(Activity_A.this, Activity_B.class); intent.putParcelableArrayListExtra("albums",…
Mina Farid
  • 5,041
  • 4
  • 39
  • 46
0
votes
1 answer

Getting stack overflow error in Android Parcelable methods

I have two classes that implement Parcelable: public class A implements Parcelable { private List bList; ... //everything else omitted @Override public void writeToParcel(Parcel dest, int flags) { …
KaliMa
  • 1,970
  • 6
  • 26
  • 51
0
votes
2 answers

Android Parcelable write / read String List null object reference

I'm trying to read a List of Strings and I keep having the following error: with the following Parcelable class: import java.util.List; import android.os.Parcel; import android.os.Parcelable; public class ActivePolicies implements Parcelable { …
0
votes
0 answers

java.lang.NoSuchMethodException Parcelable class

I had a class, I wanted to enable Parcelable on it and this is the result package ir import android.net.Uri; import android.os.Parcel; import android.os.Parcelable; public class Mall implements Parcelable { private Long _id; private String…
Majid Hojati
  • 1,740
  • 4
  • 29
  • 61
0
votes
1 answer

How to send ArrayList from Android Wear using the MessageAPI?

I have an ArrayList of parcelable custom items: ArrayList audioLogs = getAudioLogs(); I want to send this from the watch to the phone using the MessageAPI: Wearable.MessageApi.sendMessage(googleClient, node.getId(), path,…
Highway62
  • 800
  • 1
  • 10
  • 25
0
votes
2 answers

Pass ArrayList of Parcelable objects throws error

I have an object with a couple of Strings, one int and another object which has 4 inner objects. All of them implementing Parcelable. In order to generate the boilerplate code, I used Parcelable plugin from Android studio. Even though all the…
funkycookie
  • 226
  • 2
  • 16
0
votes
1 answer

How to pass library class or objects to fragments?

I want to pass a class object to a Fragment. I know to pass the class objects then we have to implement serializable or parcelable. But I can not extend or implement compiled libraries or jar files objects to parcelable or serializable. Then how can…
0
votes
2 answers

Parcleable extra not there after starting activity

I am trying to implement Parcleable so that I can add it as an extra (this is a requirement). Here is a slimmed down version of the class SwinImage which only shows relevant details, namely the parts which are derived from Parcleable: package…
Kevin
  • 979
  • 4
  • 10
  • 22
0
votes
1 answer

Parceler POJO to Parcelable fails with ParcelerRuntimeException

I have a object that contains another object and I'd like to send to from one fragment to another, using parcelable, like: Fragment fragment = new Fragment(); Bundle bundle = new Bundle(); bundle.putParcelable(mykey,…
Vasile Doe
  • 1,674
  • 1
  • 24
  • 40
0
votes
2 answers

Why can't I pass an object array trough an intent?

I want to pass Collection[] Array trough an intentExtra but it won't work. Intent intent = new Intent(SzabadEuMusorokLeirasActivity.this, SzabadEuMusorokViewActivity.class); JSONdata jsonData = new…
Marci
  • 3
  • 1
  • 4