I have multiple apps that take photos and store them on external storage.
I want to upload the photos along with some metadata to a web application running on my companies server.
I am able to write data and file URI to a database using a ContentProvider
.
I have written a SyncAdapter
to upload the files via HTTP-POST, but I am stuck because in this SyncAdapter
I cannot get permission to read the files.
My big question is: Can I use a FileProvider
to overcome this issue?
I am NOT storing the files in the ContentProvider
using an intent.
I have tried to set permissions on URL, it failed.
I Desperation I tried to export the FileProvider
, which was not allowed.
I want to be able to open an input-stream of the file in another app than the one storing the file without having to start the transfer using an Intent.