Skip to content

Take photos from the camera as attachments, with crop, rotation and size choice - #3318

Open
cheblin wants to merge 1 commit into
PhilippC:mainfrom
cheblin:feature/camera-photos
Open

cheblin wants to merge 1 commit into
PhilippC:mainfrom
cheblin:feature/camera-photos

Conversation

@cheblin

@cheblin cheblin commented Oct 2, 2026

Copy link
Copy Markdown

📝 Description

A "Take photo" button under the attachments of the entry editor, next to "Add file attachment". Useful for keeping a photo of a card, a document or a device label right in the database.

  • The camera app (ACTION_IMAGE_CAPTURE) writes the shot into a single file of the cache through a new non-exported provider (PhotoCaptureProvider, grantUriPermissions). No CAMERA permission is needed; if a merged manifest adds one, it is requested at runtime.
  • A new screen (PhotoEditActivity, a LockCloseActivity) shows the shot upright (EXIF) with a crop frame (drag the corners or sides, or the inside to move it), rotation by 90°, reset, and five sizes (320 to 2048 px on the long side, JPEG quality 40 to 85). Each size shows how many bytes it will take in the database for the current crop, measured off the main thread. The chosen size is remembered.
  • The result is attached as photo_<date>_<time>.jpg. The full-size shot is deleted right away, so nothing leaves the app (external editors save copies to the gallery).

Strings are added in English and Russian.

🔗 Related Issue

None found.

🛠️ Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

✅ Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have added/updated tests that prove my fix is effective or that my feature works. UI only.
  • All new and existing tests passed locally.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have built the app locally, verified that it builds and tested the changes thoroughly. Built with the .NET 10 Android workload (36.1), tested on a Xiaomi phone with HyperOS.

📸 Screenshots/Videos

"Take photo" under the attachments of the entry editor starts the camera
app; the shot goes to a non-exported provider in the cache. A new screen
crops it by a frame, turns it by quarters and stores it at one of five
sizes, each showing the bytes it takes for this crop; the choice is kept.
The full-size shot is deleted, nothing leaves the app.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant