I'm trying to start a new activity using intent and on finishing the activity, I want my previous activity to retain its data. I already have other activities passing some data into this main activity but on starting this new activity, when I go back, all that data disappears and gives me a null pointer exception.
Is it possible to retain the data from the previous activity? I searched about it and found I could make a singleton class but it's usage is still unclear to me.
P.S.: The real problem is I'm trying to pass a String ArrayList from this activity to the main activity but on doing so, the previous data (being passed on from previous activities) on the main activity disappears.