feat(camera): adds multi-shot camera feature (#1616)#2392
Open
shiv19 wants to merge 25 commits intoionic-team:mainfrom
Open
feat(camera): adds multi-shot camera feature (#1616)#2392shiv19 wants to merge 25 commits intoionic-team:mainfrom
shiv19 wants to merge 25 commits intoionic-team:mainfrom
Conversation
…s no exif data on android
Author
|
The thumbnail bar logic needs optimizations on Android. |
Author
|
Made improvements to image processing on the Android side. |
Author
|
Latest iOS Demo: (also updated the link in the PR desc) |
Author
|
Latest Android Demo: (also updated the link in the PR desc) |
Author
|
Latest packed plugin: (also updated the link in the PR desc) |
Author
Add handling for devices without flash in `toggleFlash`.
fix(camera): add safe guard for IOS devices without flash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This pull request introduces significant enhancements to the Camera plugin, focusing on multi-camera support and landscape mode functionality for both Android and iOS platforms. The changes include new features and UI improvements to improve the user experience when capturing and previewing images using the
@capacitor/camerapackageResolves #1616
Demos
Android - https://github.com/user-attachments/assets/5813e036-065d-49dc-bd1f-2097c657fdc8
iOS - user-attachments/assets/f70930f8-495d-4b65-bb1c-a73479a28218
Example Usage
Example Response
{ "photos": [ { "format": "jpeg", "exif": { "ColorSpace": "65535", "ComponentsConfiguration": "???", "DateTime": "2025:07:31 12:57:39", "DateTimeDigitized": "2025:07:31 12:57:39", "DateTimeOriginal": "2025:07:31 12:57:39", "ExifVersion": "0210", "ExposureTime": "0.01", "Flash": "0", "FlashpixVersion": "0100", "FocalLength": "1000/1000", "FNumber": "4.0", "ImageLength": "640", "ImageWidth": "1280", "LightSource": "0", "Make": "Google", "Model": "sdk_gphone16k_arm64", "Orientation": "1", "PhotographicSensitivity": "200", "ResolutionUnit": "2", "SubSecTime": "871", "SubSecTimeDigitized": "000", "SubSecTimeOriginal": "000", "WhiteBalance": "0", "XResolution": "72/1", "YCbCrPositioning": "1", "YResolution": "72/1" }, "path": "file:///data/user/0/<your_app_package_name_here>/cache/1000000027.1753941688084.jpeg", "webPath": "http://192.168.1.2:8101/_capacitor_file_/data/user/0/<your_app_package_name_here>/cache/1000000027.1753941688084.jpeg", "saved": false }, { "format": "jpeg", "exif": { "ColorSpace": "65535", "ComponentsConfiguration": "???", "DateTime": "2025:07:31 12:57:45", "DateTimeDigitized": "2025:07:31 12:57:45", "DateTimeOriginal": "2025:07:31 12:57:45", "ExifVersion": "0210", "ExposureTime": "0.01", "Flash": "0", "FlashpixVersion": "0100", "FocalLength": "1000/1000", "FNumber": "4.0", "ImageLength": "640", "ImageWidth": "1280", "LightSource": "0", "Make": "Google", "Model": "sdk_gphone16k_arm64", "Orientation": "1", "PhotographicSensitivity": "200", "ResolutionUnit": "2", "SubSecTime": "312", "SubSecTimeDigitized": "000", "SubSecTimeOriginal": "000", "WhiteBalance": "0", "XResolution": "72/1", "YCbCrPositioning": "1", "YResolution": "72/1" }, "path": "file:///data/user/0/<your_app_package_name_here>/cache/1000000028.1753941688118.jpeg", "webPath": "http://192.168.1.2:8101/_capacitor_file_/data/user/0/<your_app_package_name_here>/cache/1000000028.1753941688118.jpeg", "saved": false }, { "format": "jpeg", "exif": { "ColorSpace": "65535", "ComponentsConfiguration": "???", "DateTime": "2025:07:31 12:57:38", "DateTimeDigitized": "2025:07:31 12:57:38", "DateTimeOriginal": "2025:07:31 12:57:38", "ExifVersion": "0210", "ExposureTime": "0.01", "Flash": "0", "FlashpixVersion": "0100", "FocalLength": "1000/1000", "FNumber": "4.0", "ImageLength": "640", "ImageWidth": "1280", "LightSource": "0", "Make": "Google", "Model": "sdk_gphone16k_arm64", "Orientation": "1", "PhotographicSensitivity": "200", "ResolutionUnit": "2", "SubSecTime": "329", "SubSecTimeDigitized": "000", "SubSecTimeOriginal": "000", "WhiteBalance": "0", "XResolution": "72/1", "YCbCrPositioning": "1", "YResolution": "72/1" }, "path": "file:///data/user/0/<your_app_package_name_here>/cache/1000000026.1753941688143.jpeg", "webPath": "http://192.168.1.2:8101/_capacitor_file_/data/user/0/<your_app_package_name_here>/cache/1000000026.1753941688143.jpeg", "saved": false } ] }Changes Included
Motivation
Sometimes users want to be able to take multiple photos and attach them in the app. The previous UX was jarring and most users instead resort to the phone camera app and then attach files from the gallery, with the multi camera support, users can now take multiple photos without leaving your app.
Testing
Known quirks
Related Issues
Please review the changes and provide feedback or approval for merging into
main.Packed plugin (if anyone wants to try it locally)
capacitor-camera-7.0.1.tgz