Compress images and videos before upload + new upload/preview dialog + use system camera - #6429
Compress images and videos before upload + new upload/preview dialog + use system camera#6429mahibi wants to merge 4 commits into
Conversation
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/30387637532/artifacts/8699821637 |
cd7df8f to
c950080
Compare
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/30388822788/artifacts/8700239068 |
There was a problem hiding this comment.
It would be nice to formulate and design it a bit less technical. Signal e.g. specifically calls it "Sent media quality" with an easy to understand "Low" and "High" setting.
I'd say we could have a single-select segmented button in the send flow with:
- Original quality
- Reduced quality
And last selected setting remembered. What do you think @nimishavijay
c950080 to
fc85f80
Compare
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/30476294926/artifacts/8734032240 |
|
If we are able to have a fullscreen preview of the image before sending like in whatsapp,telegram, signal, etc, the |
Adds an optional compression step to the chat attachment upload flow,
covering both gallery-picked and camera-captured photos/videos.
- Add ImageCompressor/VideoCompressor utilities: images are downscaled
and re-encoded as JPEG; videos are downscaled to 540p short side and
transcoded via Media3 Transformer on a dedicated HandlerThread so the
main thread is never blocked.
- Migrate the file attachment preview dialog to Jetpack Compose, adding
thumbnails, per-file dimensions/size preview, and a "Compress images
and videos" checkbox that updates the preview live.
- Persist the compression choice as a user preference (default on),
with a toggle in Settings.
- Extend the existing upload notification to also show live progress
("Compressing… X%") while a video is being transcoded, by polling
Transformer.getProgress(), before it turns into the upload progress
notification.
- Modernize BitmapShrinker to use ImageDecoder on API 28+ (single-pass
decode+scale, automatic EXIF rotation for JPEG/HEIC), falling back to
the previous BitmapFactory-based path on API 26/27.
- Fix MIME-type resolution for file:// URIs (e.g. camera-captured
photos/videos), which previously failed dialog/thumbnail detection
since ContentResolver.getType() only handles content:// URIs.
Assisted-by: Claude Code 2.1.199:claude-sonnet-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
fc85f80 to
b50fd6b
Compare
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/30641574479/artifacts/8797835298 |
Assisted-by: Claude Code 2.1.199:claude-sonnet-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Assisted-by: Claude Code 2.1.199:claude-sonnet-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
b50fd6b to
19383a8
Compare
Assisted-by: Claude Code 2.1.199:claude-sonnet-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
19383a8 to
9267408
Compare
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/30656399981/artifacts/8803577048 |


resolve Use compression for images and files selected via gallery #5190
resolve replace photo camera code with intent to open system camera #2461
Adds automatic compression of images and videos before upload in chat, replaces the old attachment picker/preview dialog with a new Compose-based
one, and removes the app's built-in camera capture screen in favor of the system camera.
Compress images and videos before upload
transcoded via Media3 Transformer on a dedicated HandlerThread, keeping the main thread unblocked.
the previous BitmapFactory path on API 26/27.
--> this is just a temporary solution until in chat upload previews are implemented.
ContentResolver.getType() only handles content:// URIs.
New attachment preview/upload dialog
before sending.
Media quality setting
options (previously a simple switch), persisted via AppPreferences.
Removed built-in camera
PickImage, ConversationCreationActivity, ConversationInfoEditActivity, and ProfileActivity updated accordingly.
Assisted-by: Claude Code 2.1.199:claude-sonnet-5
🖼️ Screenshots
before
after
work in progress....
🚧 TODO
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)