How do you add an Enum object to an Android Bundle?
Enums are Serializable so there is no issue.
Given the following enum:
enum YourEnum {
TYPE1,
TYPE2
}
Bundle:
// put
bundle.putSerializable("key", YourEnum.TYPE1);
// get
YourEnum yourenum = (YourEnum) bundle.get("key");
Intent:
// put
intent.putExtra("key", yourEnum);
// get
yourEnum = (YourEnum) intent.getSerializableExtra("key");