-
Notifications
You must be signed in to change notification settings - Fork 308
Expose rememberCaptureMediaLauncher
#5955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose rememberCaptureMediaLauncher
#5955
Conversation
There was a problem hiding this 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
AttachmentsPickerSystemTabFactoryto 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.
SDK Size Comparison 📏
|
|


🎯 Goal
Currently it is not possible for an integrator to reuse our capture image/video logic outside of the default
AttachmentPicker.Exposes the
rememberCaptureMediaLauncherso that it is possible to re-use the logic independently from theAttachmentsPicker🛠 Implementation details
rememberCaptureMediaLauncherfor registering an Activity result launcher for capturing photo and/or video.🎨 UI Changes
NA
🧪 Testing
rememberCaptureMediaLauncherin some compose screen outside of the SDKlauncher.launch(Unit)- the camera should be started