Retool Mobile provides 20+ React Native components not available in the web builder. Camera captures photos as Base64, the Scanner supports both camera and hardware scanners (Zebra/Proglove via keyboard wedge), NFC reads NDEF-formatted tags, Signature Pad outputs a Base64 PNG, and Geolocation streams coordinates. Push notifications require the Business plan and a Workflow to send.
| Fact | Value |
|---|---|
| Tool | Retool |
| Difficulty | Beginner |
| Time required | 30-40 min |
| Compatibility | Retool Mobile (iOS and Android, Business plan) |
| Last updated | March 2026 |
Deep Dive Into Retool Mobile's Hardware-Connected Components
Retool Mobile's power comes from its ability to access physical device hardware that web browsers cannot reach: the device camera, barcode/QR scanners, NFC readers, GPS, and haptic feedback. These hardware integrations turn a mobile app into a powerful field data collection tool.
This tutorial goes component by component through Retool Mobile's hardware-connected features, showing how to configure each component, access its data in queries, and handle common edge cases. This builds on the introductory Retool Mobile tutorial and assumes you already have the mobile builder and Retool Mobile app set up.
Prerequisites
- Retool Mobile builder accessible (Business plan required)
- Retool Mobile app installed on an iOS or Android test device
- A connected Retool resource (database or REST API) for storing captured data
- For NFC: a device with NFC hardware and NDEF-formatted NFC tags for testing
Step-by-step guide
Use the Native Camera to capture and store photos
Drag a 'Native Camera' component onto the mobile canvas. When triggered (usually by a button tap that opens the component or by setting it to auto-capture), it opens the device camera. The captured photo is available as {{ camera1.value }} — a Base64-encoded image string. Display it immediately using an Image component with Source set to {{ camera1.value }}. To store it, send the Base64 string to a REST API endpoint or Supabase Storage. For S3 uploads, use an Edge Function or API endpoint that accepts Base64 and stores the file.
1// JS Query: uploadCapturedPhoto2// Sends Base64 photo to a REST API endpoint34if (!camera1.value) {5 utils.showNotification({6 title: 'No photo',7 description: 'Take a photo first.',8 notificationType: 'warning',9 });10 return;11}1213// Strip the data:image/jpeg;base64, prefix if present14const base64Data = camera1.value.replace(/^data:image\/\w+;base64,/, '');1516await uploadPhoto.trigger({17 additionalScope: {18 photoData: base64Data,19 fileName: `photo_${Date.now()}.jpg`,20 },21});Expected result: Camera opens on button tap. Captured photo appears in Image component. Upload query stores the photo.
Configure hardware barcode scanners with keyboard wedge mode
Enterprise warehouse and retail apps often use dedicated hardware scanners (Zebra, Honeywell, Proglove) instead of the device camera. These scanners output scanned values as keyboard input. In the Retool Mobile Scanner component Inspector, set Mode to 'Keyboard wedge'. In this mode, the component listens for rapid keyboard input that matches barcode patterns. The scanner works without needing camera access and processes scans faster than camera-based scanning. Test by connecting a USB or Bluetooth scanner to your device.
Expected result: Hardware scanner input is captured by the Scanner component and available as {{ scanner1.value }}.
Read NFC tags with the NFC Reader component
Drag an NFC component onto the mobile canvas. This component is invisible (no visual output) but reads NDEF-formatted NFC tags when the device is brought near one. Enable 'Auto start scanning' in the Inspector so it continuously listens. The scanned payload is available as {{ nfc1.value }} — typically a text string, URL, or JSON payload encoded in the NFC tag. Set an event handler on 'On scan' to process the NFC data. Android NFC scanning works in the background; iOS requires the user to explicitly hold the device near the tag.
1// On scan event handler for NFC2// nfc1.value contains the NDEF text record payload34const tagPayload = nfc1.value;56try {7 // Attempt to parse JSON payload from NFC tag8 const parsed = JSON.parse(tagPayload);9 await lookupAsset.trigger({10 additionalScope: { assetId: parsed.id },11 });12} catch {13 // Plain text NFC tag (e.g., serial number)14 await lookupAsset.trigger({15 additionalScope: { assetId: tagPayload },16 });17}Expected result: NFC tag read triggers the lookup query with the tag's payload. Asset details display in the app.
Collect digital signatures with the Signature Pad
Drag a Signature Pad component onto the canvas. Users draw their signature on screen using their finger or a stylus. When the user lifts their finger, the signature is captured as a Base64 PNG image available via {{ signaturePad1.value }}. Display a preview using an Image component. Add a 'Clear' button connected to the Signature Pad's reset() method and a 'Submit' button that saves the signature. Store the Base64 PNG in your database or upload to cloud storage.
1// Submit button event handler — save signature2await saveSignature.trigger({3 additionalScope: {4 signatureData: signaturePad1.value,5 recordId: table1.selectedRow.data.id,6 signedAt: new Date().toISOString(),7 signedBy: retoolContext.currentUser.email,8 },9});1011utils.showNotification({12 title: 'Signature saved',13 notificationType: 'success',14});1516// Clear the pad after saving17await signaturePad1.reset();Expected result: User signs on screen, previews their signature, and submits. Signature PNG is stored in the database.
Use Geolocation for location-aware field apps
The Location component captures the device's GPS coordinates. Set 'Watch position' to ON for continuous location tracking (useful for fleet management). For one-time location capture, use 'Detect on tap' via a button. Access coordinates as {{ location1.coords.latitude }}, {{ location1.coords.longitude }}, and accuracy as {{ location1.coords.accuracy }} in meters. Include coordinates in insert queries to tag records with a location. Use a Map component to display the current position.
1-- SQL INSERT with geolocation2INSERT INTO field_reports (3 title,4 description,5 latitude,6 longitude,7 accuracy_meters,8 reported_by,9 created_at10) VALUES (11 {{ titleInput.value }},12 {{ notesInput.value }},13 {{ location1.coords.latitude }},14 {{ location1.coords.longitude }},15 {{ location1.coords.accuracy }},16 {{ retoolContext.currentUser.email }},17 NOW()18)19RETURNING id;Expected result: Field report INSERT query includes GPS coordinates from the device.
Set up push notifications for your mobile app
Push notifications for Retool Mobile require the Business plan and use Retool Workflows. In your Retool org, create a Workflow with a schedule or webhook trigger. Add a 'Send push notification' step targeting specific users or groups. On the device, users must allow notifications when prompted by the Retool Mobile app. Notifications can deep-link to specific apps and include a data payload that the app can process when opened.
Expected result: Users receive push notifications on their devices when the Workflow triggers. Tapping the notification opens the relevant Retool Mobile app.
Complete working example
1// JS Query: completeFieldInspection2// Combines photo, signature, location, and barcode into one submission34const inspectionData = {5 asset_id: scanner1.value, // Barcode scan6 photo_base64: camera1.value, // Camera photo7 signature_base64: signaturePad1.value, // Signature8 latitude: location1.coords.latitude, // GPS9 longitude: location1.coords.longitude,10 inspector_email: retoolContext.currentUser.email,11 notes: notesInput.value,12 completed_at: new Date().toISOString(),13};1415// Validate required fields16if (!inspectionData.asset_id) {17 utils.showNotification({ title: 'Scan required', description: 'Please scan the asset barcode.', notificationType: 'error' });18 return;19}2021if (!inspectionData.signature_base64) {22 utils.showNotification({ title: 'Signature required', description: 'Please sign to confirm.', notificationType: 'error' });23 return;24}2526// Submit inspection via REST API27await submitInspection.trigger({ additionalScope: { data: inspectionData } });2829utils.showNotification({30 title: 'Inspection submitted',31 description: `Asset ${inspectionData.asset_id} inspection complete.`,32 notificationType: 'success',33});3435// Reset form components36await scanner1.clear();37await signaturePad1.reset();Common mistakes
Why it's a problem: Storing full-resolution Base64 photos directly in a SQL database column
How to avoid: Store photos in cloud storage (S3, Supabase Storage) and save only the URL in the database. Base64 photos can be megabytes in size, making database queries slow.
Why it's a problem: Setting NFC scanning to 'Auto start' and not handling the case where the device doesn't support NFC
How to avoid: Check {{ nfc1.isSupported }} before showing NFC-dependent UI. On devices without NFC, provide an alternative manual input method.
Why it's a problem: Using location1.coords without checking if location permission was granted
How to avoid: Check {{ location1.coords.latitude !== null }} before using coordinates. Show a permission request message if location is null, explaining why the app needs location access.
Best practices
- Always validate that hardware-dependent values (camera1.value, scanner1.value) are not empty before submitting
- For camera photos, compress images client-side if possible before uploading — Base64 for a full-resolution photo can be 2-5MB
- Handle camera and location permission denial gracefully with a clear explanation of why the permission is needed
- Design NFC workflows for both Android (background) and iOS (foreground prompt) scanning models
- Clear scanner and camera values after successful submission to prevent accidental duplicate submissions
- For Signature Pad, add a 'Clear' button prominently — users frequently need to redo their signature
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I'm building a Retool Mobile inspection app for field technicians. The workflow is: (1) scan asset barcode with Scanner component, (2) take a photo with Native Camera, (3) sign the inspection with Signature Pad, (4) attach GPS coordinates from Location component, (5) submit everything with a 'Complete Inspection' button. Write the JS Query for the submit button that validates all required fields (barcode, photo, signature), shows error notifications for missing items, and triggers a REST API call with the combined data.
Set up Retool Mobile components for a field inspection app: Scanner in keyboard wedge mode for Zebra scanner, Native Camera for photo capture ({{ camera1.value }} as Base64), Signature Pad with reset() on clear button ({{ signaturePad1.value }}), Location tracking with {{ location1.coords.latitude }}. Show the JS Query that validates all fields and submits via a REST API resource.
Frequently asked questions
Does the Retool Mobile Camera component support video recording?
As of early 2026, the Native Camera component supports photo capture only. Video recording is not a built-in mobile component feature. For video, you would need a Custom Component that uses the device's native video recording APIs.
Can Retool Mobile read both QR codes and standard barcodes?
Yes — the Scanner component supports all major barcode formats: QR Code, Code 128, Code 39, EAN-13, EAN-8, UPC-A, PDF417, and Data Matrix. In the Scanner Inspector, you can restrict it to specific formats or leave it set to auto-detect all supported formats.
How does offline mode work in Retool Mobile?
Offline mode (Business plan) caches app data locally using device storage. When the device loses connectivity, the app displays the last cached data. Write operations (form submissions, updates) are queued and synced when connectivity is restored. Configure which queries to cache in the mobile app's offline settings.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation