Passing an object from an Activity to another

The method startActivity(Intent intent) of the class Activity allows you to call a second activity specified using the argument Intent.
You can associate primitive data or primitive data array to the argument Intent and then the second Activity can access them, you can also pass objects of type String using methods of the class Bundle like put*().
In this post I show an example to pass a more complex object between an Activity and another.
Continue reading “Passing an object from an Activity to another”