[android-developers] Re: FileObserver

2016-11-07 Thread Shyam Kumar
Hi Developers,
 
This is about FileObserver Bug. I am using FileObserver in my application 
to keep track of newly created, deleted and modified files (images, video, 
MS Word document and PDF files). I am successful in handling these events 
in Lollipop but partially successful in Marshmallow.
 
Detailed issue in Marshmallow.

   1. I have tested this in Nexus 6 Marshmallow and it works fine.
   2. But, when it comes to* LG Marshmallow and Samsung s7 (Marshmallow) *I 
   am not able to capture the files.
   3. When I tested in these mobiles, below events are not triggered, the 
   events number are refereed from the this link. 
   https://developer.android.com/reference/android/os/FileObserver.html


   - *Create - 256 *
   - *Delete - 512*
   - *Modified - 2 *

These event numbers are *not triggered.* Is this a bug in Marshmallow 
itself ? Why its not working in Samsung s7 and LG marshmallow devices? Is 
Samsung and LG devices with Marshmallow restricting us from capturing using 
file observer?
 
Please share your suggestions and help me to resolve these issues
 
Thank You
Shyamkumar M

On Thursday, May 3, 2012 at 7:20:50 PM UTC+5:30, Meryeme wrote:
>
> hey everyone!!
>
> I have been reading the doc about fileObserver but I did not have 
> enough information about that. so I am wondering how can we use 
> FileObserver, can we use for any file I mean even .xml or .db files? do you 
> konw any tutorial about that?
>
> -- 
> Meryeme Ayache.
>
> *Third year Computer Science Student Engineer at  **Ecole Nationale 
> Supérieure d'Informatique et d'Analyse des Systèmes (Rabat)*
>
> *Information Security System Major.*
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/c3b8364b-a889-447d-9d2b-33ff3069923c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: fileobserver

2016-11-07 Thread Shyam Kumar
Hi Developers,
 
This is about FileObserver Bug. I am using FileObserver in my application 
to keep track of newly created, deleted and modified files (images, video, 
MS Word document and PDF files). I am successful in handling these events 
in Lollipop but partially successful in Marshmallow.
 
Detailed issue in Marshmallow.

   1. I have tested this in Nexus 6 Marshmallow and it works fine.
   2. But, when it comes to* LG Marshmallow and Samsung s7 (Marshmallow) *I 
   am not able to capture the files.
   3. When I tested in these mobiles, below events are not triggered, the 
   events number are refereed from the this link. 
   https://developer.android.com/reference/android/os/FileObserver.html


   - *Create - 256 *
   - *Delete - 512*
   - *Modified - 2 *

These event numbers are *not triggered.* Is this a bug in Marshmallow 
itself ? Why its not working in Samsung s7 and LG marshmallow devices? Is 
Samsung and LG devices with Marshmallow restricting us from capturing using 
file observer?
 
Please share your suggestions and help me to resolve these issues
 
Thank You
Shyamkumar M

On Thursday, February 5, 2009 at 4:43:25 PM UTC+5:30, and.pradeep wrote:
>
> thanks solved it. instead of creating in separate threads i did it in 
> single thread by creating an instance of fileobserver for each 
> directory and calling startwatching(); in a loop. 
>
> On Feb 4, 11:03 pm, Dianne Hackborn  wrote: 
> > You don't need to create any threads to use FileObserver -- it is 
> > callback-based. 
> > 
> > On Tue, Feb 3, 2009 at 11:27 PM, pradeep  wrote: 
> > 
> > > i need to observe a sdcard i.e all the folders inside. i am creating 
> > > fileobservers for each folder in saparate threads, but i don't think 
> > > it is efficient. is there any other method for do so? 
> > 
> > -- 
> > Dianne Hackborn 
> > Android framework engineer 
> > hack...@android.com 
> > 
> > Note: please don't send private questions to me, as I don't have time to 
> > provide private support.  All such questions should be posted on public 
> > forums, where I and others can see and answer them. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/cc663ec4-b033-47f9-892c-a743fc72022b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2012-07-30 Thread Alik Elzin
See an open bug:
http://code.google.com/p/android/issues/detail?id=12479

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

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

2010-10-12 Thread Freddy
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  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  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  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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


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

2010-10-12 Thread FrankG
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  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  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 -

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


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

2010-10-11 Thread Freddy
ok.  I found more info.  Apparently the docs are incorrect.
FileObserver does not support recursive file watching.

On Oct 11, 1:50 pm, Freddy  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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: FileObserver

2010-07-12 Thread perumal316
Hi,

Thanks for the help. Yes, my class name was also FileObserver. Now
managed to resolve it.

Regards,
Perumal

On Jul 12, 6:49 pm, Mark Murphy  wrote:
> On Mon, Jul 12, 2010 at 2:31 AM, perumal316  wrote:
> > I want to observe the changes made to the filesystem. I am reposting
> > as previously I have used a wrong title to post.
>
> > I am using FileObserver for this purpose. But I am getting this error
> > when i
> > import android.os.FileObserver:
>
> > "The import conflicts with a type defined in the same file"
>
> > Any idea how to resolve this?
>
> It sounds like you have a class in this file named FileObserver, or
> another import that is importing a class named FileObserver.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: fileobserver

2009-02-05 Thread and.pradeep

thanks solved it. instead of creating in separate threads i did it in
single thread by creating an instance of fileobserver for each
directory and calling startwatching(); in a loop.

On Feb 4, 11:03 pm, Dianne Hackborn  wrote:
> You don't need to create any threads to use FileObserver -- it is
> callback-based.
>
> On Tue, Feb 3, 2009 at 11:27 PM, pradeep  wrote:
>
> > i need to observe a sdcard i.e all the folders inside. i am creating
> > fileobservers for each folder in saparate threads, but i don't think
> > it is efficient. is there any other method for do so?
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: fileobserver

2009-02-05 Thread and.pradeep

what if I have to observe 2 or more folders (or paths)? even then
threads are not required?

how to register callbacks?

On Feb 4, 11:03 pm, Dianne Hackborn  wrote:
> You don't need to create any threads to use FileObserver -- it is
> callback-based.
>
> On Tue, Feb 3, 2009 at 11:27 PM, pradeep  wrote:
>
> > i need to observe a sdcard i.e all the folders inside. i am creating
> > fileobservers for each folder in saparate threads, but i don't think
> > it is efficient. is there any other method for do so?
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: fileobserver

2009-02-04 Thread Dianne Hackborn
You don't need to create any threads to use FileObserver -- it is
callback-based.

On Tue, Feb 3, 2009 at 11:27 PM, pradeep  wrote:

>
> i need to observe a sdcard i.e all the folders inside. i am creating
> fileobservers for each folder in saparate threads, but i don't think
> it is efficient. is there any other method for do so?
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---