What problem does it solve?
Adding camera capture, gallery image selection, and barcode/QR scanning to a Power Apps mobile app requires careful handling of Expo module permissions, discriminated-union result types, and Dataverse image column uploads, which is error-prone when written by hand.
Core Features & Use Cases
- Camera and Gallery Wrappers: Generates
src/native/camera.ts with takePhoto() and pickImage() functions that return discriminated-union results and never throw.
- Barcode/QR Scanner Control: Writes
src/native/barcodeScanner.tsx using expo-camera's CameraView with one-shot scan locking, pause/reset lifecycle, and overlay rendering rules.
- Dataverse Image Upload Helper: Creates
src/native/cameraUpload.ts that reads a photo URI as base64 and patches a Dataverse Image column via a generated service's update() method.
- Use Case: A field inspector app needs an evidence-capture screen where a technician photographs equipment, scans a QR code to look up the asset record, and attaches the photo to the record's Dataverse Image column.
Quick Start
Ask the agent to run /add-native camera in an initialized Power Apps mobile app project to generate the camera wrapper, scanner control, and upload helper.