Migrate barcode widget to datacapture module - #31
Conversation
Move the barcode scanner widget implementation from the :catalog module into :datacapture so it is available as a reusable component across all platforms. - Add BarcodeItemViewFactory, CameraPermissionProvider, and ScannerDialog with platform actuals for Android, iOS, JVM, and wasmJs - Add ic_barcode drawable resource to :datacapture - Update strings.xml with barcode-related string resources - Update datacapture/build.gradle.kts with required dependencies
barcode-demo.mp4here is a video demo of the barcode.. |
|
While building optimize wasmjs |
LZRS
left a comment
There was a problem hiding this comment.
Please check and confirm that the internal modifier for the some of the classes/functions removed would actually be need to exposed by the library
| <!-- Barcode widget --> | ||
| <string name="scan_barcode">SCAN BARCODE</string> | ||
| <string name="rescan">RE-SCAN</string> | ||
| <string name="camera_permission_required">Camera Permission Required</string> | ||
| <string name="camera_permission_message">Camera access is required to scan barcodes. Please grant camera permission to continue.</string> | ||
| <string name="open_settings">Open Settings</string> | ||
|
|
There was a problem hiding this comment.
Indent to match format in the file
| <!-- Location widget --> | ||
| <string name="record_gps_location">Record GPS Location</string> |
There was a problem hiding this comment.
This should be part of the other PR on location widget. Please delete
| } | ||
| } | ||
| } | ||
| } // end Column |
| ) | ||
| } | ||
| } | ||
| } // end object BarcodeItemViewFactory |
There was a problem hiding this comment.
Is Barcode scanner no longer supported for iOS? Could you please check the previous implementation, it should be supported
- Revert BarcodeItemViewFactory to internal; keep CameraPermissionProvider public since catalog depends on it directly (expect/actual visibility) - Fix strings.xml indentation for barcode widget strings - Remove record_gps_location string block (belongs to location widget PR) - Remove stray trailing comments on closing braces in BarcodeItemViewFactory - Implement real iOS barcode scanner using kscan's ScannerView, replacing the placeholder (kscan already supports iOS via AVFoundation) - Add moko-permissions dependencies to shared iosMain source set,
|
|
@MeshackKangi I tried building from this branch, it's failing with import error for BarcodeItemViewFactoryMatcher |
|
@LZRS let me check on it,.. |
The barcode migration commit moved BarcodeItemViewFactoryMatcher from catalog to datacapture but never updated this import, breaking the catalog build.
I have made a change to fix it |
module into :datacapture so it is available as a reusable component
across all platforms.
Changes
ScannerDialog with platform actuals for Android, iOS, JVM, and wasmJs
Closes #10