I’m working on an android app where I have only 2 activities… The first activity call the second activity.. At the start my app initialize a global ArrayList with some informations taken over the internet… then a thread starts and every 10 seconds fetch the same informations and updates the ArrayList ( thread doesn’t allocate it again )… When I start the second activity, this one fetch the ArrayList at the start… this works in my emulator and my phone ( htc wildfire ) but for someone that has my app, this works only for about 20 minutes, after that the ArrayList become null… why this?? oh btw, the ArrayList is a CopyOnWrite ArrayList, if could be important…
Thanks in advance for any reply,
=.4.S.=
This is a guess due to the lack of details you’re posting, but most probably your first Activity is being killed and thus the ArrayList is collected by the GC.