Well, it's simple: I have a FileObserver class to watch a music folder. So I implemented onEvent and all that, but when I move or paste the file into this folder using the file manager, instead of getting the FileObserver.MOVED_TO or FileObserver.CREATE file, I get strange events with numbers like 1073741656 that are not documented: http : //developer.android.com/reference/android/os/FileObserver.html
So, how do I get these specific events, such as delete, move, create and insert?
[edit] Here is the code:
private class MusicsFileObserver extends FileObserver { public MusicsFileObserver(String root) { super(root); if (!root.endsWith(File.separator)) { root += File.separator; } } @SuppressWarnings("unused") public void close() { super.finalize(); } public void onEvent(final int event, String path) {
android
Paulo cesar
source share