I have 2 fragments in an activity A, Frg1 and Frg2. Frg1 requires an object o1 as input and Frg2 requires o2 as input.
There is another activity B. So i start from Frg1 where I already have o1. So i populate Frg1 then i move to Frg2 where I get o2 and populate it. So in my fragment stack there are Frg1 and Frg2. then from Frg2 i move to activity B thus destroying activity A. So i loose o1 and o2 as well. On pressing back from activity B, I need to go to Frg2 then on back again I have to go to Frg1. To solve this I am passing o1 and o2 to activity B and on pressing back retrieving them on activity A. I want to know if this is the best way or is there any simple way to deal with this.