When creating FileObserver, the path must be absolute for the directory in which the file you are observing is located:
fileObserver = new SDCardListener(FileCache.getCacheDir().getAbsolutePath(), FileObserver.MODIFY);
Also change this:
public void onEvent(int event, String path) { switch (action) { case FileObserver.MODIFY: Log.d(TAG, "event: MODIFY"); break; } }
If onEvent does not start, try changing the initialization method of FileObserver so that it lists ALL_EVENTS and prints an event that is a trigger. Then you can understand why MODIFY is not a trigger.
source share