-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Support SAF properly #5415
Support SAF properly #5415
Conversation
Wow you're on fire. |
@opusforlife2 I don't know, with the setting migration everyone should seamlessly switch to SAF, but I'd keep the option anyway since on some phones Files apps can be difficult to use, and some users might complain. The code wouldn't be simplified much if we were to remove the setting. |
Viva la democracy. |
Could you confirm that all of the following things work? in the ci APK
Thanks in advance. @imcmjha @xibr @B0pol @domiuns @fajis1 @mqus @MD77MD @Poolitzer @mhmdanas @opusforlife2 |
@Stypox I tested all the things you listed and faced no issues. |
everything you asked me to look at worked, but there were some crashes that I had. I reported them via email. When I was in subscriptions it would crash when I tried to leave the subscription area. when I tried to play the videos and audio I downloaded from within the app download area. It worked for the files that auto downloaded to the specified folder. But if it asked me for the folder those would cause the app to crash when I tried to play the videos or audio. The videos and audio played just fine when I found them with the file explorer etc. So they did download successfully. |
This comment has been minimized.
This comment has been minimized.
I fixed the tests, thank you @XiangRongLin for suggesting me to Sync gradle ;-) |
Everything works for me (Android 4.4.2 (Kitkat, API19)), just two things:
|
@mqus yes, that is intentional. |
@dkraft @blauertee @k9janer @bingoxo @illustribe @RickyM7 I am also pinging you for testing since you have Android 11, by looking at the issues. Could you test the apk above with the steps above? |
@Stypox In fact the version of android I use is 7.0, you must have been confused with the version of MIUI I use that is 11. Sorry! |
@RickyM7 oh, sorry ;-) |
@Stypox Of course! |
@Stypox Ok, I tested what I could and everything is working perfectly. The only thing I couldn't test was "Import subscriptions from YouTube" because I don't have an account.
|
If I may add, I think that "SAF" in the UI should be replaced with something more easily understandable for non-Android devs, like "system folder picker". |
You are right, good idea
No, that has to be removed now. Before this PR there were incompatibilities, but now there shouldn't be anymore. |
Tested everything except "Import subscriptions from YouTube". Werks. 🎉 Exporting database with current release (so NNFP) doesn't let you rename the zip, but this PR does. Intentional? Wasn't the ability to rename the export zip removed in an earlier version for some reason? Before this PR, SAF was limited to downloads. But now it works with various other IO operations, so keeping the setting in the Download menu doesn't make sense anymore. But no other menu suits it either. Time for a new Miscellaneous menu? :D Aside: Other debug apks show "Leaks" as an option, but your apk shows "NewPipe saf Leaks". How did that happen? |
since the others checked everything else, I confirmed that importing from youtube works |
So far everything works on my Pixel 3a with GrapheneOS based on Android 11. Just 4 things I have noticed:
I tried it a few different times and for the first few tries, NewPipe just gave the error message "couldn't create folder" or something like that and I could fix it by going to the settings and re-registering the folder. But right now it's behaving differently: I'm in a situation where NewPipe recognizes that storage access was cleared and it displays the toast "no download folder set yet, choose the default downloader folder now". It then opens to "use this folder" dialogue and downloads the file perfectly fine. The problem is: According to the Android App Info, NewPipe now has access to the folder I choose in this dialogue, but the same error toast and procedure keeps repeating every time I try to download something. So for some reason NewPipe doesn't recognize it now has storage access again. Update: Even re-registering the folder in the options menu didn't fix this. I had to force close the app and now downloading works without an error message again. |
Revert "Annotate methode parameters as NonNull" This reverts commit 004907d. Revert "Commit path immediately when import backup" This reverts commit 05eb0d0. Revert "Set ImportExportDataPath only on successful import" This reverts commit f13a1b0. Revert "Set ImportExportDataPath only on successful export" This reverts commit fd4408e. Revert "Invert if condition in ContentSettingsFragment.setImportExportDataPath for better readability" This reverts commit 92ab9ca. Revert "Move ContentSettingsFragment.isValidPath to helpers and add unit test for it." This reverts commit fa2b11b. Revert "Save backup import/export location for feature import/exports" This reverts commit 82f43ac. Remove FilePathHelperTest file
TeamNewPipe#6319 and TeamNewPipe#6402 were reverted before adding SAF changes, and have been readded at the end of SAF changes
Rebased @TobiGr |
Finally :-D :-D |
What a day to be alive |
What is it?
Description of the changes in your PR
This is the rebased #3777, and also contains:
Other than that, it is identical to #3777 (by @wb9688):
requestLegacyExternalStorage
anymore in the manifest.SharpInputStream
into NewPipe and addSharpOutputStream
.TODO
Keeping the setting in the Download menu doesn't make sense anymoreimplementing a miscellaneous menu is left for another PRFixes the following issue(s)
Fixes #3465, fixes #5198, and perhaps some others.
Due diligence