Sorry if this is obvious but I am very new to andriod (just playing around trying to learn something new).
I think this is a fairly common thing to do, but I am having trouble figuring out the best way to do it.
Right now I have 3 activities. A main activity that will start a second activity that shows a list of objects, and finally a third activity, started from the list activity, where I want to make changes to the selected object. Both the list and details activities host fragments.
Is there some safe place I store the selected object and retrieve it from the details activity/fragment? It seems like the main activity is the only common link, but I am not sure I can count on that activity not having been destroyed.
Do I need to pass it via an Intent? This seems it would work but also seems overly complicated. (I am thinking I have to serialize the object and return it as a result of the activity)
Should I just combine the final 2 list and details activities into one activity, and swap out the fragments? I think if I do that I can safely store the selected object in the combined activity, is that correct?