news-android
news-android copied to clipboard
Downloading an image inside an article does nothing on Android 13
Steps to reproduce
- Open an article with an image on Android 13
- Long click on the image
- Click the download button
Expected
App should ask for permission and download the image.
Actual
Nothing happens. Asking for permission error gets printed in logcat.
Cause
The documentation states regarding WRITE_EXTERNAL_STORAGE:
Note: If your app targets Build.VERSION_CODES.R or higher, this permission has no effect.
I don't know if downloading single images is a feature worth maintaining. It requires maintaining a lot of code and handling storage access is notorously difficult on Android. I would suggest dropping this feature and replace it with a standard Android share dialog.
With the sharing option my only concern is that we sometimes have a local file (if it's cached by the image cache) and sometimes we have a web url (in case it's not cached yet). So we'd have to handle both cases.
I didn't get a chance to test yet but we also need to check the "Download all images" option. Maybe it's broken too.. not 100% sure.