Indeed I was suprised too. I found this post from an android.com offical stating the docs are wrong and sub-folders are NOT watched. Which does match what I'm seeing in my app. Too bad really ... that would be an excellent feature! http://groups.google.com/group/android-platform/browse_thread/thread/fb24c672bb79d7c2
On Oct 12, 12:13 am, FrankG <[email protected]> wrote: > Hi Freddy, > > strange .. I thought the FileObserver uses Linux native call > "inotify" , > which is able to send events for directories too, > > What definitly will not work is FileObserver for sysfs entries. > > Good luck ! Frank > > On 12 Okt., 00:41, Freddy <[email protected]> wrote: > > > > > ok. I found more info. Apparently the docs are incorrect. > > FileObserver does not support recursive file watching. > > > On Oct 11, 1:50 pm, Freddy <[email protected]> wrote: > > > > The FileObserver class doesn't appear to be working as advertised. > > > > I created a class extending the FileObserver class. I initialize the > > > class to watch the path of the sdcard as returned from the Android > > > Environment.getExternalStorageDirectory function. Everything seems to > > > work perfectly as long as the files are in the ROOTof the sdcard. Any > > > files within SUB-FOLDERS of the sdcard are NOT returned to my public > > > void onEvent(int event, String path) callback in my FileObserver > > > class. > > > > Has anyone seen this issue? The docs say files in subfolders should > > > be returned to the onEvent() callback but it's not happening. Note, > > > I've only tested on the Android simulator (v2.2) since I do not yet > > > have access to a device. Maybe this is a bug specific to the > > > simulator? > > > > Thanks!- Zitierten Text ausblenden - > > > - Zitierten Text anzeigen -- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

