I'm curious to know if there's a better way to monitor a directory for file changes/creations/deletions than FileObserver
. FileObserver requires a constant reference to it, which requires a constantly running service, which is difficult and a bad practice, right?
I'd appreciate any insight as to how you monitor the filesystem without, say, draining battery or having to keep a service running. (In newer Android versions, the service is killed when you swipe the app off the recent apps stack.)
Thanks!