I have a custom class 'Game' which i init at top of activity code. I then go to another activity, usually i pass arraylists etc but i want to move to passing my custom class.....
My custom class 'game' is a bunch of strings and arraylists with getter and setter mehtods.
i get a
Game is not a parcelable or serializable object
error when I try to add it to the intent. Any ideas what i can do here?
//Init Instance of Game class
Game newGame = new Game();
Set my listener. It works for
//Setup onclick listeners
text.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i = new Intent(this_Activity.this, next_Activity.class);
i.putExtra("players", myList);
i.putExtra("newGame", (Parcelable) newGame);
startActivityForResult(i, 0);
}
});