tags:

views:

29

answers:

1

Hi guys is their a way to put a POJO inside the intent.putExtra?

i have looked into the API's and it only seems to support of type string, int, double, boolean etc but not a actual POJO/regular java object.

Thanks in advance

+1  A: 

You can use a POJO as long as it implements Serializable or Parcelable. Take a look at intent.putExtra(String, Serializable) or intent.putExtra(String, Parcelable).

Erich Douglass
so something liek this should work:ConsumerObject consumer = (ConsumerObject) intent.getSerializableExtra("CONSUMER");ConsumerObject being my POJO
jonney
sorted lads. it works
jonney