I've got some issues while try to send information from an activity to an other. I want to send some custom object. I load them in my first activity, because of optimisation, but now i want to get them in the activity that will use them so my idea was to put extras and get thoses extras BUT i can't get them because i don't really know how to use put extra for custom methods
Here is my object :
public class VMyCode{
private String name;
private ArrayList<GeneticStep> code;
private int image;
public VMyCode(){
this.name = null;
this.code = null;
this.image = -1;
}
public VMyCode(String name, ArrayList<GeneticStep> code, int image){
this.name = name;
this.code = code;
this.image = image;
}
public int getImage() {
return image;
}
public String getName() {
return name;
}
public ArrayList<GeneticStep> getCode() {
return code;
}
public void setName(String name) {
this.name = name;
}
public void setCode(ArrayList<GeneticStep> code) {
this.code = code;
}
public void setImage(int image) {
this.image = image;
}
}
What i want to do is send from the first activity an ArrayList of VMyCode and get it in the other activity.
I've tried to make my object implements Serializable, and getSerializableExtras casted into an ArrayList, but don't looks like it's working.
If someone has some idea, feel free to share ! Thanks
Ps : Sorry for my english.