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

Volume closed even though "Keep volume open" is enabled #250

Open
gitoss opened this issue Nov 2, 2023 · 5 comments
Open

Volume closed even though "Keep volume open" is enabled #250

gitoss opened this issue Nov 2, 2023 · 5 comments

Comments

@gitoss
Copy link

gitoss commented Nov 2, 2023

Using DroidFS 2.1.3 with Samung One UI 5.1 Android 13 (Galaxy S20), the volume gets closed after a short while, making it necessary to re-enter the passwords, even though "Keep volume open" is enabled.

All apps using the mounted volume get disconnected, essentially breaking this feature.

I have disabled "Battery Optimization", however I cannot put the app on the "Never sleeping apps" list because it's doesn't seem appar on the app list at all. Even disabling "Put unused apps to sleep" for all all all apps doesn't work, so maybe the reason why the volume is closed isn't the sleep mechanism.

Other apps seem to enable some manifest magic to be able to actually stay enabled in the backgroud, or use the brute force method to show a permanent notification so they aren't killed by the OS.

@Murilogs1910
Copy link

I don't think that option is supposed to keep the volume open after you closed the app, but only when the app in open on background.

When that is turned off, if you open a volume and then go to another app, when you come back the volume will have been closed. That feature is there so that the volume will stay open in cases like this, not when you actually close the app.

If you want to make sure you keep your volumes open, I'd suggest locking the app on the recents, to make sure you don't close it by mistake.

@gitoss
Copy link
Author

gitoss commented Dec 3, 2023

Thanks, I'll try that and report back if Samsung still manages to kill DroidFS.

The pin method is manually though, could you please consider the usual "forced notification" method to keep the app and the volume open? DroidFS currently is the only app that even tries to implement a mount-ish feature that works on current Android versions...

In any case, imho the options needs a better description because people might think "Keep volume open" will, well, actually keep the volume open no matter what.

@Murilogs1910
Copy link

Thanks, I'll try that and report back if Samsung still manages to kill DroidFS.

Great, hope it works just fine!

The pin method is manually though

Pinning the app was just a suggestion, but the app will stay open as long as you don't close it. And, in order not to close it, you don't have to do anything, really.

could you please consider the usual "forced notification" method to keep the app and the volume open?

I don't think it's needed, but it might be a great addition. You'll have to wait for the actual dev to say what he thinks of this.

In any case, imho the options needs a better description because people might think "Keep volume open" will, well, actually keep the volume open no matter what.

I beg to differ. The feature is named "Keep volume open when the app goes in background", as opposed to "Keep volume open". It clearly states that the volumes will be kept open when the app is open in the background, not when it is closed for good.

@gitoss
Copy link
Author

gitoss commented Dec 4, 2023

I beg to differ. The feature is named "Keep volume open when the app goes in background", as opposed to "Keep volume open". It clearly states that the volumes will be kept open when the app is open in the background, not when it is closed for good.

Right - however, with recent Android versions "background" is not as clear cut as it used to be due to battery saving measures. If "background" means the app still appears somewhere in the (long) recent apps list it's easy to tell - but at the same time it still can be oom-killed or inactive. When the battery is near exhaustion, additional app limitations might kick in.

Generation of apps have struggled with this, and even disabling all battery optimizations and the like isn't a safe method... and using DroidFS to "mount" a file system it should be.

Thus the forced notification method, other would be having a quick tile (i.e. the app never really deactivates) or running as an accessibility service.

With my S20 phone with more memory Android will keep more apps in the "active" background, while with my old S7 and less memory it was a pita to keep even a couple of apps in "active" background for more than a very short time.

However, I'll throw everything at it and see if (and when) the volume unmounts on my S20 (Android 13, One UI 5.1)

@hardcore-sushi
Copy link
Owner

Implementing a foreground service to prevent volumes from being killed by the system could be a nice addition to the app. This should be used with extreme caution though, as volumes could then stay open for an infinite amount of time.

If this feature is implemented, we will probably have to details a bit more what's the difference with the "Keep volumes open when the app goes in background" feature.

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

3 participants