Added support for Java 7 language features like multi-catch, try-with-resources, and the diamond operator. These features require version 19 or higher of the Build Tools. Try-with-resources requires minSdkVersion 19; the rest of the new language features require minSdkVersion 8 or higher. To use the new language features after installing ADT 22.6.0, ensure that you run Eclipse on JDK 7 and change your application project settings to use JDK 7.
From Android Developers, we can use FileObserver to know files or folders changed on sdcard.
We usually use this to implement.
And start StorageMonitor in onCreat().
Launched application and modified files/folders on sdcard. Then I cannot see any event printed in logcat. I tried several Android Phones and versions (HTC ONE X 4.2.2, Samsung Note3 4.4.2, Google Nexus5 5.0...etc). FileObserver worked well in some Android Phones, for example, HTC ONE X 4.2.2 always passed.
Last, I try to use other constructor of FileObserver. It works for all!!