Granular permissions for Documents or Pdf Android 13 API 33

411 views Asked by At

I know there are others similar thread, but I believe that a case was not evaluated: When you create a file and then unistall and reinstall the app.

My app saves pdf in the shared 'Documents' folder, getting the path through Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) So my pdf is saved in Documents -> MyAppName

If I unistall and then install the app, I can't see all the pdf files created before (I think the new installation is seen like a different application, could be?). I can see the photos, because we have the Manifest.permission.READ_MEDIA_IMAGES but what about documents? Am I forced to implement SAF and let the user browse and choose the folder (with the possibility that he will choose the wrong folder)? In this case, how can I check that I have permissions for that specific folder?

0

There are 0 answers