news-android icon indicating copy to clipboard operation
news-android copied to clipboard

Downloading an image inside an article does nothing on Android 13

Open cemrich opened this issue 2 years ago • 2 comments

Steps to reproduce

  1. Open an article with an image on Android 13
  2. Long click on the image
  3. 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.

cemrich avatar Oct 25 '23 18:10 cemrich

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.

cemrich avatar Oct 25 '23 19:10 cemrich

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.

David-Development avatar Oct 28 '23 09:10 David-Development