java - Unable to send large Array of parcelable objects in another actvity -


i have 2 activity first activity activity1 gets data server filters , saves in arraylist of parcelable objects while displaying loading screen. after that, activity1 passes data gathered acitivty2 displays 2 child fragments.

my problem when list of data in activity1 few passed activity2 when not, acitivity 2 wont display , starts other acitivty mainacitivty instead.

here function used start activity2 activity1

bundle mbundle = new bundle();        intent intent = new intent(activity_viewdata_loader.this, activity_viewdata.class); mbundle.putparcelablearraylist("mylist", sneardatalist); intent.putextras(mbundle); 

and here activity2 receiver

bundle mbundle = getintent().getextras(); sneardatalist= mbundle.getparcelablearraylist("mylist");  

and parcelable class looks this

public class sentdata implements parcelable  {      private int _id;     private string _data="";     private string _lat="";     private string _long="";     private string _img="";     private string _imgp="";     private int _sntvia;     private string _snttime="";     private string _template="";      public sentdata(){}     public sentdata( string data, string lat, string longt, string img, string imgp, int sntvia, string sntime, string template  ){         this._data = data;         this._lat = lat;         this._long = longt;         this._img = img;         this._imgp = imgp;         this._sntvia = sntvia;         this._snttime = sntime;         this._template = template;     }      public sentdata( int id, string data, string lat, string longt, string img, string imgp, int sntvia, string sntime, string template  ){         this._id = id;         this._data = data;         this._lat = lat;         this._long = longt;         this._img = img;         this._imgp = imgp;         this._sntvia = sntvia;         this._snttime = sntime;         this._template = template;     }      public int getid(){         return this._id;     }      public void setid(int id){          this._id = id;     }     public void setdata(string data){         this._data = data;     }      public string getdata(){         return this._data;     }      public void setlat(string lat){         this._lat = lat;     }      public string getlat(){         return this._lat;     }      public void setlong(string longt){         this._long = longt;      }      public string getlong(){         return this._long;     }      public void setimg(string img){         this._img = img;      }      public string getimg(){         return this._img;      }      public void setimgp (string imgp){         this._imgp = imgp;     }      public string getimgp(){         return this._imgp;     }      public void setsentvia(int sntvia){         this._sntvia = sntvia;     }      public int getsentvia(){         return this._sntvia;     }      public void setsenttime(string sentime ){         this._snttime = sentime;     }      public string getsenttime(){         return this._snttime;     }      public void settemp (string tmp ){         this._template = tmp;     }      public string gettmp(){         return this._template;     }      @override     public int describecontents() {         // todo auto-generated method stub         return 0;     }      public sentdata(parcel source){         _id = source.readint();         _data = source.readstring();         _lat = source.readstring();         _long = source.readstring();         _img = source.readstring();         _imgp = source.readstring();         _sntvia = source.readint();         _snttime = source.readstring();         _template = source.readstring();     }      @override     public void writetoparcel(parcel dest, int flags) {         // todo auto-generated method stub         dest.writeint(_id);              dest.writestring(_data);         dest.writestring(_lat);         dest.writestring(_long);         dest.writestring(_img);         dest.writestring(_imgp);         dest.writeint(_sntvia);         dest.writestring(_snttime);         dest.writestring(_template);     }      public static final parcelable.creator<sentdata> creator = new parcelable.creator<sentdata>() {          @override         public sentdata createfromparcel(parcel source) {             // todo auto-generated method stub             return new sentdata(source);         }          @override         public sentdata[] newarray(int size) {             // todo auto-generated method stub             return new sentdata[size];         }        }; } 

please me.. don't know do. have other methods in mind don't want let go of simple method because of size of data. there might else must or don't know yet, why wont pass large size arraylist.

create class arraylist of parcelable objects set parcelable objects arraylist , pass class object next activity through bundle.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -