Monday, October 11, 2010

[android-developers] Re: FileObserver not returning file changes within subfolders?

ok. I found more info. Apparently the docs are incorrect.
FileObserver does not support recursive file watching.

On Oct 11, 1:50 pm, Freddy <f...@charter.net> 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!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate