You haven't shown enough code to be certain, but it's very likely that you are not holding a reference to your data anywhere in your application except the static elements of the MonitorHandler class. The Dalvik VM will unload unreferenced classes from time to time, so the next time you access the class it is reloaded, the static initialisation is re-run, and you end up with a new, empty list.
The bottom line is that the only class that you can rely on not being unloaded during the execution of your Android application is the Application class itself.
If you want to retain data in your application the only approach that works is to maintain a reference to it from your Application class. In the case of your list the simplest way to do that is put it into your Application class directly. With more complex data you would probably want to create an instance of a separate class and hold a reference to it statically in your Application class. Here is an example showing two different ways to create the data, one statically, one lazily.
import android.app.Application;
import android.content.Context;
import com.example.DiskLruImageCache;
import java.util.ArrayList;
import java.util.List;
public class TestApp extends Application {
static final public int CACHE_SIZE = 1024 * 1024 * 15; // 15MB
private static List<String> stringList = new ArrayList<String>();
private static DiskLruImageCache imageCache = null;
private static Context context;
@Override
public void onCreate() {
super.onCreate();
context = this;
}
public static List<String> getStringList() {
return stringList;
}
static public DiskLruImageCache getImageCache() {
if(imageCache == null) {
synchronized(context) {
if(imageCache == null)
imageCache = new DiskLruImageCache(context, "TestImages", CACHE_SIZE);
}
}
return imageCache;
}
}
Now in your Activities or Service you can simply call TestApp.getStringList()
to get the list. Any changes to this will be preserved as long as the application is running.