My app needs to download PDF bills for customers, and I'm targeting Android 13 for this release. I've noticed that the storage permissions have changed, and now there are three new permissions: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, and READ_MEDIA_AUDIO. However, there isn't a specific permission for downloading documents, and I'm unsure about the right approach to achieve this.
Should I use the Storage Access Framework (SAF)? I found examples on how to read files from external storage but not how to write to it.
Here are some key details about my app:
- The app's main activity displays a list of settlements.
- When the user clicks on an item in the list, a custom dialog is opened, which provides details about the payroll and a button to download the PDF bill.
- The bills are stored in an S3 bucket, and I currently use the document URL with the DownloadManager API to initiate the download.