-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] Monitor directory #458
Comments
I may give the android port of inotifywait a try, if I can get it to build. There doesn't seem to be any pre-built apks for it. |
One way to achieve what I want would be to root my phone, install busybox and then create a cron job to move the files every 15 minutes or so as described here: https://android.stackexchange.com/questions/140162/creating-a-cron-job-on-android I'm going to try doing this with easer first but will easer be able to do this automatically in the background, without having to have my phone in a fully on/active state for it to work? |
There is also a crond app available via fdroid which looks like a better solution than using busybox but it also requires root. |
crond didn't work for my purposes but a dev who had forked crond took pity on me and very quickly wrote a whole new open source Android app specifically for moving files from one dir to another called MoveFiles: https://github.com/a1291762/MoveFiles MoveFiles can be easily installed from the devs f-droid repo. |
Is your feature request related to a problem? Please describe.
I use ZGCAM as a camera but, like gcam, its main issue for me is it doesn't give me the option to save pictures and videos to my microSD card which I'd prefer because I'd still be able to access those files if my phone broke.
Describe the solution you'd like
I would like Easer to have the ability to monitor a directory for files and then run a command when new files appear in that directory. In my case I want to move all (new) files in my DCIM/Camera dir to my uSD card.
Describe alternatives you've considered [optional]
gcam tool - Non free and not very reliable from the reviews I've read online.
It might be possible to do what I want by running two instances of syncthing on different ports but thats a bit messy as it doesn't support syncing local dirs.
Under desktop/server Linux you can achieve this with a systemd service or using inotifywait. it seems Android has a class called FileObserver for this that uses inotify:
https://developer.android.com/reference/android/os/FileObserver
"Each FileObserver instance can monitor multiple files or directories. If a directory is monitored, events will be triggered for all files and subdirectories inside the monitored directory."
The text was updated successfully, but these errors were encountered: