In my app I have a FileObserver on /mnt/sdcard/dcim/camera folder so that whenever an image is taken from a camera my app is notified. It works as expected on phones having Android 2.1/2.2/2.3. I am trying to make it work on a Motorola Xoom with Android 3.1/3.2 but it doesnt work. I checked this folder exists and whenever an image is taken using the camera app that a file with that image is created in /mnt/sdcard/dcim/camera but somehow OnEvent() method of FileObserver is not called. Anyone else faced the same issue?
Asked
Active
Viewed 424 times
2
-
As a change from previous versions, Honeycomb implements the "sdcard" using a FUSE driver to emulate FAT semantics on top of a unix filesystem, I suppose it's possible that could break the underlying notification mechanism? – Chris Stratton Aug 07 '11 at 18:42
-
Is it possible that you are losing your reference to the observer and gc is cleaning it up now where in previous versions you got lucky? – Earl Aug 07 '11 at 19:41
-
I am not loosing reference and it is working perfectly fine on 2.3. – Yatendra Aug 08 '11 at 16:32
-
Any progress with this? I am trying to do something similar but I cannot even get the FileObserver to catch in Android 2.1+ I appreciate any help. Have a question here - http://stackoverflow.com/questions/7265906/how-do-you-implement-a-fileobserver-from-an-android-service – shanabus Sep 01 '11 at 03:51