android - FileObserver is called twice -
I am using a file opswer to view a folder in Android. When a user modifies or creates a new file in this folder, then FileAbaserver should do some stuff with this file.
This is the fact that using the Block Files Observer Modify, every time I create / modify a file in the folder that is viewed, the file observer method (event) is called twice. This is a problem for me because it breaks whatever I do later (this is done twice).
This is my code:
mFileObserver = new FileObserver (modify directory, file ossever) {public event on event (int event, string filename) {if (event = = File Observer Modifiers) {// do something}}};
Comments
Post a Comment