Possible Duplicate:
How to pass object from one activity to another in Android
I want to pass a user defined class object from one Activity to another. I know the way we pass a String to other Activity:
Intent in=new Intent(LoginActivity.this,WebserviceClient.class);
in.putExtra("res", "abc");
startActivityForResult(in, 0);
and how to extract it on the other side:
Intent i = getIntent();
res = i.getStringExtra("res");
But I want to know how to do this for both sides for a user defined object?
You need to implement your class to
Parcelableinterface.This guide may help Pass complex object data structure to Intent