Skip to content
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

Auto move #14

Open
yephny opened this issue Feb 28, 2024 · 20 comments
Open

Auto move #14

yephny opened this issue Feb 28, 2024 · 20 comments

Comments

@yephny
Copy link

yephny commented Feb 28, 2024

Hi, I think the app is great and fills a serious gap. I noticed in the description the mention of an auto move feature, but I can't see how I can enable the feature.

@w2sv
Copy link
Owner

w2sv commented Feb 28, 2024

Hey, thanks a lot! The 'auto move' feature refers to the one, that enables you to move a file to a previously selected destination via the To /{previous_destination_dir_name} notification action, without having to manually select the directory once again. The feature name might admittedly be a little misleading, you're right on that. I'll try to think of a better one.

How exactly did you expect the auto move feature to work?

@yephny
Copy link
Author

yephny commented Feb 29, 2024

I thought there would be a way to set a directory for each file type so that the app would automatically move downloaded files without user interaction.

@w2sv
Copy link
Owner

w2sv commented Feb 29, 2024

Okay I see, should be feasible and certainly would be a nice addition to the app functionality. I'll try to implement it asap.

@yephny
Copy link
Author

yephny commented Feb 29, 2024

The app is great already the way it is, for sure it'd be even better with this feature implemented. File management, or lack thereof, has been one of my biggest gripes with Android. This app solves it.

@HasanAbbadi
Copy link

Yes, I also was kinda misled by the name "auto move" 😄

I hope this will be implemented properly soon, as well as adding more file extensions such as .epub and .mobi.

This project has a lot of potential. Great work!

@b02860de585071a2
Copy link

b02860de585071a2 commented May 19, 2024

I also assumed that the intention of "auto save" was to filter and automatically move files without user interaction. To my knowledge, this functionality isn't provided by any application currently available (at least on F-Droid or in the FOSS sphere of influence).

Some kind of regex filtering system that acts on user-defined and nested rules would be AMAZING, I'm not sure how much of a battery/CPU impact it would have though? Might need to be something that runs on a fixed schedule or watches for filesystem changes.

Example use cases:

  • Any files found in /[...]/BadFolder/ are moved to /[...]/GoodFolder/ (useful for apps that download/store files in annoying or unwanted locations)
  • Files of MIME type image created in /[...]/Download/ OR /[...]/Documents/ExampleSubfolder/ are moved to /[...]/Pictures/
  • Files that match the regex .*\.apk are moved to /[...]/APK/, then anything in that folder matching (?i).*github.* is further moved to /[...]/APK/GitHub/

I have written some scripts for my Linux machines that perform similar tasks, having this on Android too in a somewhat "official" manner (instead of creating Termux scripts, etc) would be absolutely fantastic.

@deathblade666
Copy link

I agree the name auto move would imply no user interaction at all. I have only seen one other app that does this and it hasnt been updated in nearly a decade and assumed discontinued (no longer on play store, and sadly not FOSS) called redirect pro. I think your app has ALOT of potential and could be the perfect tool I've been looking for if it had a true auto move.

Thanks a TON for creating such an amazing app thus far, can't wait to see whats in store for it in future releases!!

@w2sv
Copy link
Owner

w2sv commented May 28, 2024

Yes, I also was kinda misled by the name "auto move" 😄

I hope this will be implemented properly soon, as well as adding more file extensions such as .epub and .mobi.

This project has a lot of potential. Great work!

An eBook file type is a great idea which really ain't hard to implement. Adding more file types is a breeze in general, so don't hold back on suggestions on that end :)
I'll create a separate issue for eBooks in any case, thank you!

@w2sv
Copy link
Owner

w2sv commented May 28, 2024

Some kind of regex filtering system that acts on user-defined and nested rules would be AMAZING, I'm not sure how much of a battery/CPU impact it would have though? Might need to be something that runs on a fixed schedule or watches for filesystem changes.

The file detection mechanism that triggers move notifications is implemented through ContentObservers which are registered for external content URIs and trigger a callback, whenever a file corresponding to the respective content URI is changed. Therefore, the battery impact is really minimal, as its a reactive mechanism, however, it is also why non-media (image, video, audio) file types can't be discovered outside of the system-specific Download folder, as the Android SDK only provides external content URIs for the media types image, video, audio and download.

@w2sv
Copy link
Owner

w2sv commented May 28, 2024

In any case I've started working on the actual auto move feature. I thought I'll do it so that one can determine the auto move destination for a file type as a whole, as well as for the respective file type sources, which override the file type destination if provided. The UI integration into the settings screen still causes me some headaches, but I'll figure it out.

Regex-based filtering is a great idea which I'll keep in mind for a later release too, however for now I'll focus on making a 'basic' auto move mechanism work properly. Will be complicated and issue-prone enough in and itself I believe :D

@b02860de585071a2
Copy link

Regex-based filtering is a great idea which I'll keep in mind for a later release too, however for now I'll focus on making a 'basic' auto move mechanism work properly. Will be complicated and issue-prone enough in and itself I believe :D

Anything is better than what's currently available on the market (ie, nothing lol)!

Lately I've been fighting with working around the limited binaries in the adb shell/ksh, trust me I get it. Android development is weirdly hard.

@w2sv
Copy link
Owner

w2sv commented Jun 6, 2024

Screenshot_2024-06-06-19-34-11-912_com w2sv filenavigator debug

Just wanted to let you know that I've come to terms with what I'd consider a decent UI implementation, still got a bit of a way to go until the new release though.

@w2sv
Copy link
Owner

w2sv commented Jun 6, 2024

Android development is weirdly hard.

True dat ;)

@b02860de585071a2
Copy link

b02860de585071a2 commented Jun 6, 2024

Love it!

Just out of curiosity: is this acting on MIME types, file extensions, or something else? I was reading some documentation and it seems like Android MIME is not as fully fleshed out as *nix, despite sharing many similarities.

@w2sv
Copy link
Owner

w2sv commented Jun 18, 2024

Just out of curiosity: is this acting on MIME types, file extensions, or something else? I was reading some documentation and it seems like Android MIME is not as fully fleshed out as *nix, despite sharing many similarities.

A mix of both. There are 4 different types of ContentObservers, one respectively for Image, Video, Audio and Download, which are registered or not as per the user file type settings. I'm not quite sure how Android determines which one to call upon a new file entering the file system, but I'm guessing it'll be based on MIME types. So if the Image, Video or Audio ContentObserver is called, I know that it's a file of that respective type, upon the Download one being triggered, I'm determining the file type through file extensions I defined myself.
The source type, on the other hand, is identified by the directory the file is found in.

@w2sv
Copy link
Owner

w2sv commented Jun 18, 2024

Auto moving is now possible in 0.2.0 btw, let me know what y'all think :)

@deathblade666
Copy link

Seems to work Great! Only thing I'd ask in addition is an exclude specific folder option per file type. If that's already added then ignore this. Haven't had time to comb through everything yet

@boognish-rising
Copy link

Hey there! It looks like I'm late to the party but I just noticed the Auto Move update. I'll admit that in its absence (when I fully thought it was effectively what the app was all about), I hadn't gotten much use out of FN yet but I saw potential so I kept it installed... Well, I'm glad I did because it appears the app's trajectory is aligned with what I had previously thought. My reason for barging in on the discussion today, though, is to ask if the feature is limited to files of X type being transferred automatically (or following a notification/prompt, as configured is the Navigator Settings) from the time the Auto Move destination/link is created onward and if so, whether you'd consider implementing the transfer of existing files of X type once the destination is set.

I could see users responding to this behavior with support for & against, so it'd probably be something best left configurable/with a simple toggle to set default behavior, but I know that I for one would very much appreciate if you extended the functionality of Auto Move to include it!

PS - while more of an afterthought than it is in File Navigator, X-plore File Manager has a feature that's at least similar in concept to Auto Move (I think it's just called File Sync). In fact,on paper/in theory it's exactly what I'm looking for, i.e., both pre-existing files as well as any added from then on are to be transferred (navigated) accordingly, however, it seems to be bug-ridden. The link between source & destination is inexplicably lost and results in it being anything but automatic/automated (once they're no longer connected/synced). I set up 2 separate devices to transfer files from A->B (my PC via network share). Both worked as expected for a bit, but before long both became disconnected and the effort put into setting them up - wasted. All that to say, Android users could benefit a great deal from a user-friendly (opposed to apps like Syncthing, which is great but def more suited for advanced/power users), functional app with such capabilities!

@JaneValleyhasBtaken
Copy link

Is it possible that move all files existed before installation of the app to designated folders? The app concept is great. However, my file is already a mess and I really don't want to do it myself :(.

@b02860de585071a2
Copy link

New feature is great! Almost exactly what I'm looking for.

I do agree that acting on existing files would really make it shine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants