thunderbird / thunderbird/thunderbird-android

Download external images

Open
#4,995 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
14k
Forks
2.8k
Avg merge
3d 3h
Merged PRs (30d)
57

Description

Describe the bug
Long-pressing an external image in an HTML message offers "Download image" as an option. This uses DownloadManager to download the file. But the documentation states:

By default, downloads are saved to a generated filename in the shared download cache and may be deleted by the system at any time to reclaim space.

That means users can't actually get to the file other than through the notification that will open the file for viewing when clicked.

Expected behavior
Prompt the user for a storage location. Download and write the file to that location.

Environment:

  • K-9 Mail version: 5.721
  • Android version: tested with Android 11

Note:
I don't want us to request the WRITE_EXTERNAL_STORAGE permission just to be able to use DownloadManager. So we'll probably have to download the image ourselves. Ideally we'll use an existing library for that. Suggestions welcome.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the HTML message long-press action for "Download image" and its use of Android DownloadManager. Review the Android 11 storage constraints and the issue's permission concern; the work is done when the user can choose a storage location and the external image remains accessible there without requiring WRITE_EXTERNAL_STORAGE.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.