Closed Frankpalacio closed 4 years ago
Do you have a stack trace for us as well?
Could it be that you denied permissions on the start of picking? Googling the error message yields to answers where the permission wasn't given.
I am having the same issue. That is all the info it gives, I think. This is on the DataArray
property
I allowed permission as well. Both through here, and did permission checking through PermissionsPlugin
. That plugin is saying both Storage
and MediaLibrary
permission is granted.
Not sure if this would help https://stackoverflow.com/questions/22178041/getting-permission-denial-exception
I figured it out. Its not a problem with the library. Somewhere along the way, the reference to the file data is being lost. I fixed it within our implementation by saving the file data in a different object, then referencing the filedata else where
That may be the reason. After picking you should immedately save the file somewhere in your cache or data folder, or open the stream so that access to the file is guaranteed.
Yeah that might be something to note in the README or elsewhere. In my implementation of the FilePicker, we have one command add the files to a list, and another that goes through the same list and gets the file data to send to the backend, which is where I noticed the error. I’m sure we’re not the only ones that will use it in this manner
@heinst How did you fix this in your implementation ?
@sriharrsha I made a model with a byte array property. After a user picks a file and you get the file info from the nuget, you want to immediately copy those properties over to the new model you made for use elsewhere in the VM
Your issue could also be fixed with PR #178. Could you test this with 2.1.41-beta if it still happens? Thanks!
@vividos I had similar issue with 2.1.34, there are no trouble with 2.1.41-beta, thanks
Closing this since this project will retire, please check out Xamarin.Essentials which now has a FilePicker based on this one.
Actual Behavior
Permission Denial: opening provider com.android.providers.downloads.DownloadStorageProvider from ProcessRecord{e8c4a48d0 14678:com.companyname.litigiovirtual.admin/u0a213} (pid=14678, uid=10213) requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs ---> Android.OS.RemoteException: Remote stack trace:
Specifications