Skip to content

Conversation

@VelikovPetar
Copy link
Contributor

@VelikovPetar VelikovPetar commented Oct 8, 2025

🎯 Goal

Currently it is not possible for an integrator to reuse our capture image/video logic outside of the default AttachmentPicker.
Exposes the rememberCaptureMediaLauncher so that it is possible to re-use the logic independently from the AttachmentsPicker

🛠 Implementation details

  • Create a public rememberCaptureMediaLauncher for registering an Activity result launcher for capturing photo and/or video.

🎨 UI Changes

NA

🧪 Testing

  1. Add rememberCaptureMediaLauncher in some compose screen outside of the SDK
  2. Call launcher.launch(Unit) - the camera should be started

@VelikovPetar VelikovPetar requested a review from Copilot October 8, 2025 13:53
@VelikovPetar VelikovPetar marked this pull request as ready for review October 8, 2025 13:53
@VelikovPetar VelikovPetar requested a review from a team as a code owner October 8, 2025 13:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR exposes the rememberCaptureMediaLauncher function as a public API to allow integrators to reuse the capture image/video logic outside of the default AttachmentPicker.

  • Extracts the media capture launcher logic into a standalone public function
  • Refactors the existing AttachmentsPickerSystemTabFactory to use the new public function
  • Updates the public API surface to include the new function

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
CaptureMediaLauncher.kt New file containing the public rememberCaptureMediaLauncher function with comprehensive documentation
AttachmentsPickerSystemTabFactory.kt Refactored to use the new public function, removing duplicated logic
stream-chat-android-compose.api Updated API surface to expose the new public function
CHANGELOG.md Added entry documenting the new feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 3.22 MB 3.22 MB 0.00 MB 🟢
stream-chat-android-offline 3.45 MB 3.45 MB 0.00 MB 🟢
stream-chat-android-ui-components 10.54 MB 10.54 MB 0.00 MB 🟢
stream-chat-android-compose 12.75 MB 12.75 MB 0.00 MB 🟢

@VelikovPetar VelikovPetar enabled auto-merge (squash) October 10, 2025 09:52
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@VelikovPetar VelikovPetar merged commit a163b9f into develop Oct 10, 2025
12 of 13 checks passed
@VelikovPetar VelikovPetar deleted the bug/AND-829-expose-remember-capture-media-launcher branch October 10, 2025 10:08
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.

4 participants