Here the problem: my app will generate some files, and I want to give to the users the opportunity to exchange these files between them.
This requires 3 steps:
- Saving the data: easily done in Storage implementing the functions required by the Externalizable class;
- Sharing the data: done (probably, right now it's impossible to check if the result is correct because the missing step 3) with the sharing methods offered by the framework, as soon as I understood I needed to use as mimetype "application/octect-stream";
- importing the downloaded data (shared by another user): this one I can't manage to find a way to make it work. Loading the files from the app's Storage is easy, but accessing to the folders out of the app's Storage is something I can't manage to do.
I used FileSystemStorage in the hope of gaining access at least to the Download folder that (mostly) every phone has, but apparently I can't manage to accomplish the task
Using the FileSystemStorage on Android, for example, I have access to
- /storage/emulated/0
- /storage/emulated/legacy
- file:///system
The first two being related to the Storage of the app.
Acceding to file:/// I obtain a long list of folders, a partial list including
- media
- logs
- sdcard
- Removable
- ...
- root
- ...
But when I try to access some of these, they all appear to be empty. Either I make some mistake or the app can't see their content.
So I wonder if there is a way to accomplish the task, namely to have access to the files (probably in the Download folder) the user has downloaded, to import them.