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

Storage Access Framework support for download directories #34

Closed
1 task done
JunkFood02 opened this issue Jun 29, 2022 · 25 comments
Closed
1 task done

Storage Access Framework support for download directories #34

JunkFood02 opened this issue Jun 29, 2022 · 25 comments
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed pending This issue is being worked on
Milestone

Comments

@JunkFood02
Copy link
Owner

JunkFood02 commented Jun 29, 2022

  • Use SAF to move downloaded files to other directories.
@JunkFood02 JunkFood02 added bug Something isn't working help wanted Extra attention is needed labels Jun 29, 2022
@JunkFood02
Copy link
Owner Author

JunkFood02 commented Jun 29, 2022

For devices running Android 10 (API 29) or higher, App gain write permission to Download/ and Documents/ by default. But the only way for accessing or writing files outside these two directories is to use Storage Access Framework.
Seal does not support SAF currently. As a result, any download outside these two directories would get a Permission Denied error.

@JunkFood02
Copy link
Owner Author

JunkFood02 commented Jun 29, 2022

With SAF support, we could manually copy downloaded files to destination and delete original files after finish downloading without permission problems.
SAF could also provide SD Card support #25
Reference: dvd

@JunkFood02 JunkFood02 pinned this issue Jun 29, 2022
@yant0 yant0 mentioned this issue Jul 27, 2022
@JunkFood02
Copy link
Owner Author

@farabox1 Hi, you can just uninstall/reinstall the app or clear the data of app to reset the download directory

@Donkey-Doug
Copy link

#85

@TPAXcc
Copy link

TPAXcc commented Aug 1, 2022

🥰

@xibr
Copy link

xibr commented Aug 21, 2022

Check this maybe it helps
https://github.com/anggrayudi/SimpleStorage

@ganchair
Copy link

ganchair commented Sep 8, 2022

also see: https://github.com/K1rakishou/Fuck-Storage-Access-Framework

@achanta8
Copy link

Hi

@Marco-9456
Copy link
Contributor

Marco-9456 commented Sep 29, 2022

@JunkFood02
Check this project out when you have the time, i think it will help you get references on how to implement a way to access other directories then Download

https://github.com/deniscerri/ytdlnis

@JunkFood02
Copy link
Owner Author

references on how to implement a way to access other directories then Download

The use case in Seal could be much more complicated than this and dvd. Such as custom command, temporary files management, and resume download with .part files, some of these features may conflict with the SAF.

@Marco-9456
Copy link
Contributor

references on how to implement a way to access other directories then Download

The use case in Seal could be much more complicated than this and dvd. Such as custom command, temporary files management, and resume download with .part files, some of these features may conflict with the SAF.

I see, anyway I thought it would help a little 😃

@MuhammadSharukh
Copy link

Screenshot_2022-10-12-12-43-24-09_2b0c70832456616f1f794bb05bb8d2fa
This problem is coming, what should I do?

@BobbyESP
Copy link
Contributor

BobbyESP commented Oct 12, 2022

We haven't implemented yet SAF, a storage framework that Google made for making the file saving more secure and controllable by the users. In Seal this is kinda hard to implement because it probably means to a rewrite of the basic functions of the app.

@Jeffdow85
Copy link

I'm using latest beta as of writing this and mine is saving audio only to music as selected in that system file access manager and YouTube folder which is default for seal anyway I think. I get what you're saying about adding the function to make this problem go away but be nice if we could dismiss the warning once understood if possible. Lovely ui and app thankyou!

@BobbyESP
Copy link
Contributor

@JunkFood02 I'm trying to implement SAF in the app that I'm actually developing. If I'm able to do it I'm gonna share the code with you so we can add it to Seal. I know that there are some files like config.txt or cookies.txt that can't be saved with SAF because they need to be localizable to the app in all moment, but according to Android Developers documentation, there is an App-specific file storing so we can use that for both of that files and SAF for the Downloads.

@JunkFood02
Copy link
Owner Author

@JunkFood02 I'm trying to implement SAF in the app that I'm actually developing. If I'm able to do it I'm gonna share the code with you so we can add it to Seal. I know that there are some files like config.txt or cookies.txt that can't be saved with SAF because they need to be localizable to the app in all moment, but according to Android Developers documentation, there is an App-specific file storing so we can use that for both of that files and SAF for the Downloads.

config.txt and cookies.txt are already created in app's internal storage. The real problem of SAF migration is not the plain implementation but actually the conflict with other features, since many of them needs directly access to the file system

@BobbyESP
Copy link
Contributor

Yeah, true... I need to think about it

@Noitarud
Copy link

Temporary solution could be to allow parts…
Either finalise each video or emulate zip file creation (no compression).

@BobbyESP
Copy link
Contributor

#455 Workaround PR for being able to use SD cards in Seal. It was only tested in Android 12. The changes can be reverted/changed.

@JunkFood02 JunkFood02 added the pending This issue is being worked on label Dec 29, 2022
@JunkFood02 JunkFood02 added this to the v1.8.0 milestone Jan 2, 2023
@JunkFood02 JunkFood02 added the enhancement New feature or request label Jan 4, 2023
@JunkFood02
Copy link
Owner Author

Added in v1.8.0-beta.1, please help test this new feature out, we're ready to hear your feedback 🙌

@BobbyESP
Copy link
Contributor

BobbyESP commented Jan 5, 2023

Going to test it in a few minutes

@BobbyESP
Copy link
Contributor

BobbyESP commented Jan 5, 2023

SD downloading works fine!

@BobbyESP
Copy link
Contributor

BobbyESP commented Jan 5, 2023

I'm gonna test OTG cable because we were having issues in my PR

@BobbyESP
Copy link
Contributor

BobbyESP commented Jan 5, 2023

Downloading through OTG cable also works.

@RuhulBoss
Copy link

Isu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed pending This issue is being worked on
Projects
None yet
Development

No branches or pull requests