Questions tagged [fileobserver]

A simple abstract class developers can use to detect changes to a directory (nonrecursively) and fire callbacks as a result.

Monitors files (using inotify) to fire an event after files are accessed or changed by any process on the device (including this one). FileObserver is an abstract class; subclasses must implement the event handler onEvent(int, String).

Full Documentation Link: http://developer.android.com/reference/android/os/FileObserver.html

130 questions
0
votes
0 answers

Android Handler Message to Main Activity from FileObserver Issue

I am new to android and this is my first project and have gotten a little stuck with the Handlers and FileObservers. The app will observe a folder on the file system and when files are modified, the new image inside the folder will be displayed on…
H2wk
  • 71
  • 10
0
votes
2 answers

How to create an activity that displays a log file and observe it to refresh its layout?

I would like to display a log file that I save in the data directory of my application ("/data/data/mypackage/files/log.txt"). I need it to debug my application without eclipse. At the moment, I display the content file in a textview, and when I…
kmas
  • 6,401
  • 13
  • 40
  • 62
0
votes
1 answer

Android FileObserver finds SQLites, but not their tables/content

I'm running into a problem using a FileObserver to update a meta-database when new sqlites are added to a specific directory on the SD card. If I manually adb push a new sqlite to the directory, then call onEvent(FileObserver.CREATE, ),…
user2048643
  • 283
  • 1
  • 3
  • 14
0
votes
1 answer

Read/Get a file's readout before it changes

I am making a service that watches a file's readout changes using a stable RecursiveFileObserver , this file observer will is assigned to observe the file Modifications (FileObserver.MODIFY) ... What I want this observer to do onEvent is to change…
Seaskyways
  • 3,630
  • 3
  • 26
  • 43
0
votes
1 answer

Android: FileObserver isn't notified about FS changes

I need to track removed images and videos from the whole file system all the time (even if my UI app is not running) so directly after startup of the handset until it's turned off. For this purpose I'm using a service and FileObserver. Unfortunately…
basta
  • 145
  • 1
  • 8
0
votes
2 answers

Starting an IntentService from FileObserver

I'm writing an app that makes use of the fileobserver in android. When I file is modified in anyway (creation, etc.) it should upload. In order to implement a queue and keep from running out of memory by using threads and such, I want to use an…
Osmium USA
  • 1,751
  • 19
  • 37
0
votes
1 answer

Android FileObserver not calling onEvent in USB mass storage mode

I have FileObserver's hooked onto a particular directory in /mnt/sdcard/X and its descendants recursively. When I modify contents of this directory from the phone itself (say from the Gallery app), the onEvent() of my FileObserver is correctly…
-1
votes
2 answers

Context for an inherited service

Maybe my question is a bit dumb but I searched how to do this and I figured it out how can I solve this and I can't. I'm trying to create a Notification from a service when an event occur with the NotificationCompat class. NotificationCompat.Builder…
acostela
  • 2,597
  • 3
  • 33
  • 50
-1
votes
2 answers

NullPointerException while starting an activity in android

I am getting NullPointerException while starting a helloworld activity. I am starting this class from FileEvent.java class, which code I have put down here. public class FileEvent extends Activity implements ObserverActivity{ public static String…
nki
  • 192
  • 3
  • 17
-3
votes
1 answer

File observer is not working on usbpath

File observer is working fine with external SD Card ,internal storage , but it doesn't work with usb drive (/storage/usbotg)
Rajesh Sharma
  • 99
  • 2
  • 10
1 2 3
8
9