Commit Graph

75 Commits

Author SHA1 Message Date
Ivan Vershigora
81c46cc7ef
feat: detectQRCodeInImage API 2026-04-24 18:41:55 +01:00
Ivan Vershigora
202f9f6455
Resolve merge conflicts, preserve no-google customizations 2026-01-17 10:21:18 +00:00
Seph Soliman
a73b84ef78 Removed iOsSleepBeforeStarting
No longer needed with proper begin/commit handling
2026-01-08 16:41:43 -08:00
Seph Soliman
cdc1cced0e Fixed #758
NSGenericException "startRunning may not be called between calls to
beginConfiguration and commitConfiguration"
The root cause was that AVCaptureSession.previewLayer.session = X
causes beginConfiguration + commitConfiguration, and since we had that
running on the main thread, it caused a race condition between the main
and sessionQueue threads.
iOsSleepBeforeStarting will be removed in an upcoming major release to
avoid breaking changes in v16.
2026-01-08 12:05:17 -08:00
Ivan Vershigora
05ae12c0b1
Sync from teslamotors/react-native-camera-kit@cc6515b
Selectively synced upstream changes while preserving QR-only Android implementation.

Changes auto-synced (Category A - 19 files):
- iOS: All 8 files (stress test support + allowedBarcodeTypes filtering)
- TypeScript: All 7 files (Camera components, props, types, specs)
- Example app: All 3 files (stress test + allowedBarcodeTypes example)
- Config: Moved .nvmrc to root

Changes selectively synced (Category B - 2 files):
- CodeFormat.kt: Added UPC_A("upc-a") enum value (1 hunk applied, 1 skipped)
- README.md: Added allowedBarcodeTypes docs with QR-only note

Changes skipped (Android barcode conflicts):
- CKCamera.kt: All barcode filtering logic (~50+ hunks)
  Reason: Fork uses onBarcodeRead(String), upstream uses onBarcodeRead(List<Barcode>, Size)
- CKCameraManager.kt: setAllowedBarcodeTypes property setter
- package.json: Version bump (fork maintains independent versioning)

Upstream range: 5a709e0..cc6515b (12 commits)
Main feature: allowedBarcodeTypes barcode filtering (iOS synced, Android QR-only preserved)

Fork integrity checks:
 No Google ML Kit dependencies
 QRDecoder.decode() preserved
 limpbrains/qr dependency intact
 yarn build && yarn lint passed

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 23:27:08 +00:00
Seph Soliman
f5e3bc98e9 Add mount stress test to CameraKit example app
Introduces a mount stress test feature in the example app, allowing repeated mounting and unmounting of the CameraExample component at a configurable interval. Updates CameraExample to support a 'stress' mode that triggers image capture and random zoom changes on mount.
2026-01-05 14:33:04 -08:00
Seph Soliman
2a1f06aa12 Fixed optional behavior of allowedBarcodeTypes
Added more barcode types
2025-12-30 15:11:19 -08:00
Ivan
91909ff575
replace google mlkit with limpbrains/qr 2025-12-29 14:36:52 +00:00
Seph Soliman
9a41d1c8ae Fixed SafeAreaView dummy support on iOS
Fixed zoom issue
Fixed Fabric (new arch) compile issues on both platforms
Fixed included broken codegen lib code
Fixed broken .h import paths to avoid setting custom build settings
Fixed potential memory issue by disabling view recycling
Added Fabric (new arch) support for camera view component
Added RN 0.81 for example
Added RN 0.79 for main lib
Added helper for re-running codegen
Added gitignore for Android codegen making a podspec
Added support for scanThrottleDelay on Android
Added includesGeneratedCode to package.json to indicate changes
Rewrote optional int props to use -1 instead due to RN bug
Moved to Obj-C with C++ support (.mm) to avoid C++ compile issues
2025-09-04 15:38:29 -07:00
Seph Soliman
7089dd3735 Upgraded example to RN 0.81
Added consistent example styles
Added node requirement specification
Removed SafeAreaView
Added dummy SafeAreaView implementation
2025-08-26 18:29:52 -07:00
Seph Soliman
089fd73041 Fixed AVCaptureSession (2nd attempt)
Fixed iOS 13 compile errors
2025-06-09 16:46:02 -07:00
Seph Soliman
76d956a69a Fixed lint issues
Removed hidden StatusBar to fix under-camera UI on Android
Fixed missing execution bit on gradlew
2025-06-09 14:05:14 -07:00
Seph Soliman
ed64f2fc46 Fixed AVCaptureSession startRunning error
commit should always follow a begin
2025-04-23 15:56:09 -07:00
phlpsong
855b90b5fe feat: add barcodeFrameSize prop 2025-02-24 22:08:16 +08:00
Seph Soliman
ace123eefa Added maxPhotoQualityPrioritization for iOS
Allows a massive capture speed-up of 60-80%
2024-11-14 13:34:07 -08:00
Seph Soliman
21f760117b RN 0.71.0 -> 0.74.1
Added support for volume buttons as capture buttons
Added yarn v3.6.4
2024-05-14 17:43:02 -07:00
Martin Lichstam
80c517dc68
Add resize mode cover/contain (#644)
* Add resize mode cover/contain

* Add resize to simulator, change type enum and add listener for resize

* Add resize to camera example

* Add description of resizeMode to readme

* Add description of resizeMode to readme

* Update ios/ReactNativeCameraKit/CameraView.swift

---------

Co-authored-by: Seph Soliman <github@seph.dk>
2024-04-30 16:24:19 -07:00
Imdad Ismail
234e7f89eb
added code format to see type of code scanned (#633)
* added code format to see type of code scanned

* Update ios/ReactNativeCameraKit/SimulatorCamera.swift

Changed supported barcode types to list of CodeFormat

Co-authored-by: David Bertet <11665957+DavidBertet@users.noreply.github.com>

* Update android/src/main/java/com/rncamerakit/CodeFormat.kt

Added annotation for int type

Co-authored-by: David Bertet <11665957+DavidBertet@users.noreply.github.com>

* Added CodeFormat types and fixed an indentation on a function to match other functions

* Replaced AVMetadataObject with CodeFormat in all files

* Updated code format to case Iterable and changed supportedBarcodeType to code format cases

* Update src/Camera.d.ts

---------

Co-authored-by: David Bertet <11665957+DavidBertet@users.noreply.github.com>
Co-authored-by: Seph Soliman <github@seph.dk>
2024-04-30 16:18:00 -07:00
David Bertet
8a2df98333
Fix barcode screen top button size (#631) 2024-04-30 16:10:35 -07:00
Seph Soliman
81d5ba8147 Allow disabling the photo capture shutter sound on Android (#583) 2023-10-11 11:15:21 -07:00
Seph Soliman
79fb48e863 Hide statusbar when camera is open 2023-07-25 12:38:47 -07:00
Seph Soliman
c4ac4a00d6 Fixed focusMode and zoomMode not being enabled by default 2023-07-25 09:57:31 -07:00
Seph Soliman
40cc209652 Fixed maxZoom not being normalized 2023-07-19 15:10:15 -07:00
Seph Soliman
dc10c8a8fa Added UI rotation example code 2023-07-19 10:28:51 -07:00
Seph Soliman
21f713d62d Added new camera flip icon
Added a customizable capture button in example
2023-07-19 09:55:00 -07:00
Seph Soliman
3253daa6c3 Changed and normalized default zoom to be 1.0x (thx @DavidBertet) 2023-07-18 21:03:14 -07:00
Seph Soliman
e129096208 Fixed zoom prop not working when cameraType is switched
(must explicitly be reset using zoom={0} if that is wanted)
Fixed non-unique queue name
2023-07-16 23:30:18 -07:00
Seph Soliman
91c57f0ded Fixed uncontrolled zoom not working on the barcode scanner 2023-07-14 16:54:21 -07:00
Seph Soliman
e6688a2c69 Added zoom control on Android 2023-07-13 18:09:21 -07:00
Seph Soliman
f58bc77ef1 Added zoom control
Added max zoom control
Added onZoom handler
2023-07-12 18:12:33 -07:00
Seph Soliman
478a68b23e Fixed scan frame dimensions on Android 2023-07-10 12:18:35 -07:00
David Bertet
5f1096230c Rework UI to make it work on both platforms 2023-07-08 01:30:02 -07:00
David Bertet
d738b6c8d2 Using hooks/functional component for App 2023-07-04 12:43:32 -07:00
David Bertet
d92b40b202 Make button targets bigger by adding some padding 2023-07-04 01:40:17 -07:00
Seph Soliman
fee756b55c Fixed orientation issues for both orientation locked and rotated UIs
Added support for thumbnails (for later)
Fixed default zoom to be wide angle camera instead of ultra wide
2023-07-03 20:21:20 -07:00
Seph Soliman
37737ace6f Rewrote example project
Using hooks/functional components
Fixed zoom on second pinch
Fixed orientation issues
Added support for new ultra wide camera (fix blurry close ups)
2023-07-03 20:21:11 -07:00
Seph Soliman
5a7df3ee80 Removed CameraScreen 2023-07-03 20:21:01 -07:00
Seph Soliman
8e7b1dae47
Merge pull request #545 from DavidBertet/task/improve_type_definition
Improve type definition & README
2023-06-11 17:49:44 -07:00
David Bertet
8cd7648b41 Update example to react native ^0.71.0 2023-06-02 02:10:55 -07:00
David Bertet
05c8f1862c Improve type definition 2023-06-02 02:08:14 -07:00
aarongrider
0083a6889a Add build script and begin fixing build errors 2021-05-27 08:59:49 -07:00
aarongrider
5c3341d228 minWidth and minHeight for camera component 2021-02-04 16:44:00 -08:00
aarongrider
75edaf08c6 Default Camera to flex of 1 2021-02-04 15:55:47 -08:00
aarongrider
95781c9be2 Fix color props and update api 2021-01-11 11:16:40 -08:00
aarongrider
b909d01dfc Add torch mode 2021-01-09 13:12:53 -08:00
aarongrider
acd1a6c347 Fix Android barcode scanning 2021-01-08 18:08:29 -08:00
aarongrider
41f915d42f Refactor camera screen and fix bugs 2021-01-07 23:05:06 -08:00
aarongrider
dd597249c2 Add prop to show capture count 2021-01-05 16:38:30 -08:00
aarongrider
c3b62afba7 iOS: Update api 2021-01-04 14:45:03 -08:00
aarongrider
86739ddfeb Fix formatting in CameraExample 2020-12-06 22:45:47 -08:00