First of all create Serializable interface
like :-
public class Model implements Serializable {
Create model Class implement Serializable
public class Model implements Serializable{
public String Userid, Type;
public String getUserid() {
return Userid;
}
public String setUserid(String Userid) {
this.Userid = Userid;
return Userid;
}
public String getType() {
return Type;
}
public String setType(String Type) {
this.Type = Type;
return Type;
}
public String Userid, Type;
public String getUserid() {
return Userid;
}
public String setUserid(String Userid) {
this.Userid = Userid;
return Userid;
}
public String getType() {
return Type;
}
public String setType(String Type) {
this.Type = Type;
return Type;
}
and then pass object Model class
Model mod = new Model();
Intent intent = new Intent(firstactivity.this, Secondactivity.class); intent.putExtra('Name',mod);
Retrive value from one activity to another activity
Model object = getIntent().getSerializableExtra("name");
Reference:-
Android intent
Android object