You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will work, but after clearing the application data or after restarting the smartphone, the application will no longer have access to the downloaded videos.
Because in Android ≧ 10, to work with external files you need to use SAF, that is, Intent.ACTION_OPEN_DOCUMENT_TREE and registerForActivityResult, then as a result I get a Uri as the user-selected path, which I cannot correctly convert into a full path for transmission to YoutubeDL.
How to download a video with only the Uri?
A temporary solution is to download the file to cacheDir and then move it to the desired directory
The text was updated successfully, but these errors were encountered:
This will work, but after clearing the application data or after restarting the smartphone, the application will no longer have access to the downloaded videos.
That's true for clearing the app data or uninstalling the app, but a reboot won't invalidate the file access afaik
to download the file to cacheDir and then move it to the desired directory
I am developing an application with Android ≧ 10 target system.
And if I try to get the directory to save the video like this:
This will work, but after clearing the application data or after restarting the smartphone, the application will no longer have access to the downloaded videos.
Because in Android ≧ 10, to work with external files you need to use SAF, that is,
Intent.ACTION_OPEN_DOCUMENT_TREE
andregisterForActivityResult
, then as a result I get aUri
as the user-selected path, which I cannot correctly convert into a full path for transmission toYoutubeDL
.How to download a video with only the Uri?
A temporary solution is to download the file to
cacheDir
and then move it to the desired directoryThe text was updated successfully, but these errors were encountered: