OK, so I want to retrieve a photo from the phone... I use the ContentChooser to get the photo.
Now, I want to save the location of that picture in a file, and reload it at a later time.
I can GET the picture the first time... That's working. Then I save the Dir and FileName to variables that are saved in the file.
When I reload the file, I want to set an image control to that photo.
I'm getting a Security message when I try to access that file again:
java.lang.SecurityException: Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider from ProcessRecord{429c19b0 13253:com.twodogapps.gaa/u0a136} (pid=13253, uid=10136) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS
The file dir and file name that are being saved are:
Dir:
ContentDir
FileName:
content://com.android.providers.media.documents/document/image%3A131
The ContentChooser is initialized, I'm pretty sure. I set the image like this:
iv.SetBackgroundImage(LoadBitmap(gs.listhere(Index).PhotoDir, gs.listhere(Index).PhotoFile))
In the above line, the index is correct and is getting the values above. As soon as it hits this line, I get the SecurityException shown above.
What am I doing wrong here?
Also, on my phone's permissions for the app it says:
- Modify or delete the contents of your USB storage
- full network access
- access Bluetooth settings - Pair with Bluetooth devices
- read the contents of your USB storage.
As far as I can tell those are all I need in terms of permissions.
I don't want to save the file in my apps database because they're just too big and no need to waste duplicate space.