Skip to content

Screenshots fail on Android 6–9: storage permission is never requested #28

Closed

Description

@compot-dev

On API < 29, Decoder.takeScreenshot() uses MediaStore.Images.Media.insertImage(). On API 23–28 that needs the runtime permission WRITE_EXTERNAL_STORAGE. The manifest declares it (maxSdkVersion="28"), but the app never calls requestPermissions(). The insert throws a SecurityException, and the user only sees "Failed to save screenshot".

Fix: request the permission on the first long press (API 23–28 only), or save to app-specific storage and share from there.

Activity

  1. added
    bugSomething isn't working
    in progressBeing worked on right now (open PR)
    on Oct 12, 2026
  2. added a commit that references this issue on Oct 12, 2026
    8c26ffb
  3. added a commit that references this issue on Oct 12, 2026
  4. added 2 commits that reference this issue on Oct 15, 2026
    20b37bb
    d86b938
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions