Skip to content

Attachment menu as a bottom sheet with a recent media grid and a camera tile #6814

Description

@ToteMeiSter

Is your feature request related to a problem? Please describe.
To send a recent photo, I open the attachment menu, choose "Gallery" and pick the photo in the system Photo Picker. Other messengers show the latest photos and videos directly in the attachment sheet, so a recent photo needs one tap.

I know this was discussed before: #4715 ("Show last images in Share menu directly") was closed as done with the system Photo Picker from #4829, because of the Google Play policy (#4313). So this is a renewed proposal, and I would like to ask first: would you accept a recent media grid in the attachment menu at all?

Describe the solution you'd like
Replace the attachment dialog with a Compose ModalBottomSheet:

  • The sheet opens half way and can be dragged up.
  • A grid of the newest photos and videos (3 columns, up to 300 MediaStore entries, video duration shown). Tap selects, up to 10 items, with a numbered circle. "Send (N)" opens the existing attachment preview, then the existing upload path (UploadAndShareFilesWorker).
  • The first tile shows a live CameraX preview. A tap opens the camera.
  • A bar at the bottom keeps all 9 existing entries with the same visibility conditions (camera photo/video, gallery, file from device, file from cloud, thread, poll, location, contact). The conditions are covered by a unit test.
  • During a call, the camera tile shows an icon instead of a live preview.

Media permissions:

  • Android 14+: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO and READ_MEDIA_VISUAL_USER_SELECTED. With partial access, the grid shows only the selected items, plus a "Select more photos and videos" entry.
  • Without permission, the grid is replaced by an "Allow access" button. The bar with all entries still works.
  • Note: declaring READ_MEDIA_VISUAL_USER_SELECTED turns off the Android 14 compatibility mode for the whole app. PlatformPermissionUtilImpl.isFilesPermissionGranted() must then accept partial access, otherwise voice and video messages, camera photos and "file from device" ask again. The fork handles this.

Describe alternatives you've considered
To respect the Play policy, I see these options:

  1. gplay: only the bottom sheet with the system Photo Picker, no grid and no READ_MEDIA_* request for it. generic: the grid as described.
  2. The grid behind an option in the settings, off by default.
  3. Keep the current dialog.

Which one would you prefer, if any?

Additional context
Tested by me on a Huawei DEL-LX9 with a fork build.

A working implementation is in the fork: https://github.com/ToteMeiSter/talk-android/tree/feat/attachment-sheet
The lens selection is shared with the video message recorder from #6812. A follow-up with an in-app camera builds on this sheet: #6815.

The same proposal for iOS: nextcloud/talk-ios#2743.

Implementation: #6819 (depends on #6818). The PR is opened for discussion, not to skip the approval.

The analysis and this text were prepared with an AI assistant (Claude Code) and reviewed by me.

Activity

  1. mahibi commented on Oct 5, 2026

    @mahibi
    Collaborator

    Hi @ToteMeiSter thank you for your contributions/created issues.
    We will review them soon

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions