I was dealing with a project where I have multiple pages and they both deal with the same object. The object was saved in the cloud. I could retrieve this object from cloud anytime I want and in any page. But I wanted to reduce the number of calls I make to the cloud backend.
Here is what I need to do
public class Event implements Serializable {
private String eventId;
private String eventName;
private String category;
}
Event eventObj = new Event();
Intent i = Intent(Context packageContext, Class> cls)
i.putExtra("Event", eventObj);
startActivity(i);
Intent i = getIntent();
Event event = (Event) i.getSerializableExtra("Event");