revolution-irc icon indicating copy to clipboard operation
revolution-irc copied to clipboard

Make the app-internal Downloads directory accessible externally on Android 11

Open hXtreme opened this issue 5 years ago • 16 comments

Frankly there's no good reason to save download files to application directory so the option is just a bloat and not only that but very disruptive as those files can't be accessed/processed/transferred easily.

hXtreme avatar Oct 01 '20 13:10 hXtreme

I am mixed about it being a bug. The reason it's there is so you don't have to give the app Downloads dir permission.

MCMrARM avatar Nov 24 '20 09:11 MCMrARM

But anything saved there can't be accessed from outside the app. So maybe there should be a way to move data out of the application directory.

@MCMrARM I'm really sorry if my issues sound a bit harsh, back then I had spent a good few hours downloading some files on a limited data connection and when it turned out that I couldn't transfer it to my laptop I just broke down and became very frustrated and angry.

Thanks for working on this app, and sorry once again.

hXtreme avatar Nov 24 '20 11:11 hXtreme

I think it saves it in external storage by default so it should be saved to Android/data/io.mrarm.irc/files by default I think.

I mean I am pretty sure the app asks for the Download dir permission on the first download though.

MCMrARM avatar Nov 24 '20 14:11 MCMrARM

I believe contents of Android/data aren't accessible without root permissions.

Yes the app does ask for permission but anything that's saved in the app directory isn't accessible.

Follow the below steps:

  1. Set download directory to app directory.
  2. Download a file.
  3. Try to copy the file to a Download directory (This step wasn't possible for me)

Edit: Updated to not involve MTP.

hXtreme avatar Nov 24 '20 14:11 hXtreme

They are accessible using most file explorers just fine. Unless you have no Internal Storage but that's kind of rare.

Android MTP is broken as hell and as such I would heavily recommend against using it in any reproduction steps. Please try accessing the directory with a pre-Android 11 file manager.

MCMrARM avatar Nov 24 '20 16:11 MCMrARM

Unfortunately I don't have any pre Android 11 devices.

The following is a screenshot of what I get when I try to access the data folder:

Screenshot_20201124-094645

related: https://support.google.com/pixelphone/thread/70501031?hl=en&msgid=72762121 TLDR; it's not accessible without root

hXtreme avatar Nov 24 '20 16:11 hXtreme

Ah so it changed with Android 11. This is more of a request to properly support Android 11 then. I haven't looked into what changed in Android 11 yet, but it seems like some new API will have to be used to expose the directory.

MCMrARM avatar Nov 24 '20 17:11 MCMrARM

That or you could add an option to move a downloaded file to a specific directory.

Best, Harsh

On Tue, 24 Nov 2020, 12:18 pm MCMrARM, [email protected] wrote:

Ah so it changed with Android 11. This is more of a request to properly support Android 11 then. I haven't looked into what changed in Android 11 yet, but it seems like some new API will have to be used to expose the directory.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MCMrARM/revolution-irc/issues/265#issuecomment-733120566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFLC6G5VPVLDVLT45AWZSALSRPTGHANCNFSM4SANAPQQ .

hXtreme avatar Nov 24 '20 17:11 hXtreme

If possible I'd like to keep an app-internal directory since I do not want to require read permission to Downloads folder if I don't need it. I think Android 10 and 11 introduced APIs which might actually deprecate the need to request the Downloads folder permission altogether, so preferably these should be used. I'll try to look into proper Android 11 support once I manage to find a stable Android 11 ROM for my OnePlus 5 (or get a new phone).

MCMrARM avatar Nov 24 '20 17:11 MCMrARM

Frankly I was just hoping if you could add an additional option called either move or export right above the delete option that already exists for downloads.

And you can ask for permission if and only if someone wants to move it to a place where the app doesn't have permission to write to.


You should be able to use the Android emulator bundled with the IDE to run Android 11.


Also, I don't think I've heard anything about Android eventually not requiring permission for Download directory. That actually sounds opposite of what they've been doing recently.

hXtreme avatar Nov 24 '20 18:11 hXtreme

Nah, I am pretty sure they introduced a way to have per-app Download directories and then show it together in the Downloads app. I am not sure how it works since I only skimmed over it somewhere.

I do not like the Android emulator and would rather get a real device when possible.

MCMrARM avatar Nov 24 '20 18:11 MCMrARM

This would seem to be related to #46

kurahaupo avatar Mar 23 '21 03:03 kurahaupo

This would resolve #264

kurahaupo avatar Mar 23 '21 03:03 kurahaupo

@MCMrARM In what world do you live? You have guts to try to justify something like this. scam app, uninstalled.

Bakaba avatar Mar 06 '24 16:03 Bakaba

@Bakaba chill out, if you have such a big problem this is open source fork it and fix it yourself no need to be toxic.

hXtreme avatar Mar 09 '24 06:03 hXtreme