Im trying to read a json file from an external storage without sucess. Im getting the error:
Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{bfaa1d6 26301:com.plm.valdecillasurdemo/u0a284} (pid=26301, uid=10284) requires that you obtain access using ACTION_OPEN_DOCUMENT or related API
- My manifest.xml file is OK
- I am checking in runtime for READ_EXTERNAL_STORAGE permission and only read the file when the permission is granted
- When I try read the file I getting the related error.
In a second approach I started an ACTION_OPEN_DOCUMENT Intent.
A system dialog ask me for picking a file and all is fine. I read the file correctly however I dont want be asked for a Uri. My Uri is hardcoded.
I know must be easy the solution but this problem is drives me crazy...How can I resolve this?
Thanks in advance.