Android Question Access to ALL files

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Question:

I have 2 apps
I want them to be able to either share a 3rd folder or to create a shared folder or simply access to download folder
This is for them both to share some temporary data file that one will write and the other read

Can i do it ?
How?
Does it require permission to access all files? If so how do i get this permission?

Thanks
 

emexes

Expert
Licensed User
FileProvider might be enough:


or maybe ExternalStorage:

FileProvider allows you to share files with other applications using an intent.
ExternalStorage allows your app to access sd cards and usb devices.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
There is no simple permission that grants access to all files.
Actually there is as long as you don't want to have the apps in the Play Store
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
thank you guys for the replies
i think i'm lost here
i just want to be able to read and write files to download folder or any other if that not possible
i don't want the user to be in the flow or to need to do anything
App1 read & write to Downloads
App2 read & write to downloads

it will always be the same file name

App1 will check if the file exists
if yes will delete it and call App2

App2 will check if exists
if yes will delete and write to it and exit

App1 will get control back and if the file exists it will read and delete it

app1 & app2 are currently working but share the data in cloud
i want them to share it on the device and save the access to the cloud
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
It is not possible in newer versions of Android (on the Play Store). Two apps cannot share a file unless you ask the user to grant access with ExternalStorage. And you will not have direct access to the file so you will probably need to copy it to the app folder each time before opening it.
i have no problem to ask the user once for permission
i do it anyways for other things so i can add one more permission

now, if the user granted the permission - will i be able to do what i want seamlessly to the user?
if so than it is perfect to me - how do i do it? just by external storage?
how do other apps that do read and write to downloads do that?
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
There is no such permission and all your questions are answered here: The available options are listed here: SaveAs - Let the user select a target folder + list of other related methods and in the linked tutorials.
let me see if i got you right - every time i want to save i need to ask the user?
if that so it can't be a solution for me

i just don't get how other apps can read and write to downloads folder?
that's exactly want i'm looking for
i must be missing something
 
Upvote 0
Top