I need to share a list among all my activities, so I've extended my application class in order to store inside it my list :
public class MyApplication extends Application {
public ArrayList<Object> theList = new ArrayList<Object>();
}
It works fine, except sometimes when I resume the app, the list is cleared. The list is not null but is empty (while I never clear the list in my code of course).
I wonder why the list is cleared. If it's because of the garbage collector, the list would be null, isn't it ?
Do you know a way to keep data even after resume ?