Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass object using intent?

 
Viswan Nathan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

How to pass objects (which is object of object) using intent from one activity to another activity.

For example i have the following classes

class Customer {

CustomerType type[];
string customername;

}

class CustomerType {

int id;
String type; example it will hold domestic customer / international customer

}

I have tried using parcelable interface to send the object from one activity to another activity. But i could not able to get it. Is there any other approach/ sugesstions on the same.

Regards,
Viswanathan.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i could not able to get it.

Which means what, exactly? TellTheDetails
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using Intent.putExtra(); you will have to make your classes implement the Parcelable interface. It would help if you showed ALL of the code you tried - neither of the classes you posted implement Parcelable. And also show the call to putExtra().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic