Skip to content

Commit e3e59ee

Browse files
committed
QRCode settings for endpoint
1 parent 50b27ce commit e3e59ee

File tree

3 files changed

+96
-1
lines changed

3 files changed

+96
-1
lines changed

AI_MultiBarcodes_Capture/src/main/java/com/zebra/ai_multibarcodes_capture/settings/SettingsActivity.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,18 @@ private void initializeScanReceiver()
11271127
public void scannedData(String source, String data, String symbology) {
11281128
if(symbology.equalsIgnoreCase("QRCODE"))
11291129
{
1130-
1130+
if(data != null && data.startsWith("AIMultiBarcodeEndpoint:"))
1131+
{
1132+
String endpoint = data.substring("AIMultiBarcodeEndpoint:".length());
1133+
runOnUiThread(new Runnable() {
1134+
@Override
1135+
public void run() {
1136+
etHttpsEndpoint.setText(endpoint);
1137+
Toast.makeText(SettingsActivity.this,
1138+
getString(R.string.endpoint_updated_from_qr), Toast.LENGTH_SHORT).show();
1139+
}
1140+
});
1141+
}
11311142
}
11321143
}
11331144
});

AI_MultiBarcodes_Capture/src/main/res/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,4 +477,7 @@
477477
<!-- Managed Configuration Messages -->
478478
<string name="managed_configuration_updated">Settings updated by administrator</string>
479479

480+
<!-- QR Code Endpoint Messages -->
481+
<string name="endpoint_updated_from_qr">Endpoint updated from QR code</string>
482+
480483
</resources>

wiki/07-Android-App-Configuration.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ The AI MultiBarcode Capture app provides dual-mode operation:
88
- **File-based Mode**: Stores barcode data locally for offline operation
99
- **HTTP(s) Post Mode**: Real-time data transmission to web management system
1010

11+
### 🚀 Quick Configuration Features
12+
- **📱 QR Code Endpoint Setup**: Automatically configure HTTP endpoint by scanning a QR code from your WMS
13+
- **⚙️ Manual Configuration**: Traditional manual endpoint and authentication setup
14+
- **🔧 Advanced Settings**: Camera resolution, processing modes, and barcode symbologies
15+
1116
## ⚙️ Settings Configuration
1217

1318
### Access Settings
@@ -61,6 +66,48 @@ Authentication: Enabled (if configured on server)
6166
SSL Certificate Validation: Enabled
6267
```
6368

69+
### QR Code Endpoint Configuration
70+
71+
The Android app supports automatic endpoint configuration via QR code scanning, providing a convenient way to connect the mobile app to your WMS (Web Management System).
72+
73+
#### How to Use QR Code Configuration
74+
75+
**Step 1: Generate QR Code from WMS**
76+
1. Open your WMS web interface in a browser
77+
2. Navigate to the **Endpoint** or **Configuration** section
78+
3. Click on the **QR Code** button or icon
79+
4. The system will display a QR code containing the endpoint URL
80+
81+
**Step 2: Scan QR Code with Android App**
82+
1. Launch the AI MultiBarcode Capture app on your Android device
83+
2. Tap the **Settings** (gear) icon to open app settings
84+
3. Use the Zebra Imager to scan the QR Code
85+
4. A toast message will confirm: "Endpoint updated from QR code"
86+
5. The **HTTP(s) Endpoint** field will be automatically populated
87+
88+
#### QR Code Format
89+
The QR code must contain data in the following format:
90+
```
91+
AIMultiBarcodeEndpoint:http://192.168.1.100:3500/api/barcodes.php
92+
```
93+
or
94+
```
95+
AIMultiBarcodeEndpoint:https://barcode-api.company.com/api/barcodes.php
96+
```
97+
98+
#### Benefits of QR Code Configuration
99+
- **Zero-typing**: Eliminates manual URL entry errors
100+
- **Quick Setup**: Instant connection to WMS
101+
- **Accuracy**: Prevents typos in complex URLs
102+
- **User-friendly**: No technical knowledge required
103+
- **Scalable**: Easy deployment across multiple devices
104+
105+
#### Security Considerations
106+
- QR codes should only be displayed on trusted networks
107+
- Consider using HTTPS endpoints for production environments
108+
- Validate the endpoint URL before saving settings
109+
- Monitor for unauthorized QR code scanning attempts
110+
64111
### Network Discovery Methods
65112

66113
#### Method 1: Find Computer IP Address
@@ -231,6 +278,40 @@ docker-compose ps
231278
- Reduce session size
232279
- Enable automatic upload to reduce local storage
233280

281+
### QR Code Configuration Issues
282+
283+
#### QR Code Not Scanning
284+
**Symptoms:**
285+
- App doesn't respond to QR code
286+
- No toast message appears
287+
- Endpoint field remains unchanged
288+
289+
**Solutions:**
290+
1. **Check QR Code Format**: Ensure the QR code contains data starting with `AIMultiBarcodeEndpoint:`
291+
2. **Improve Lighting**: Ensure adequate lighting when scanning
292+
3. **Camera Focus**: Allow camera to focus properly on the QR code
293+
4. **Distance**: Hold device at appropriate distance (6-12 inches)
294+
5. **Screen Brightness**: Increase WMS display brightness if scanning from screen
295+
296+
#### Incorrect Endpoint Populated
297+
**Possible Causes:**
298+
- QR code contains wrong URL
299+
- WMS generating incorrect endpoint
300+
- Network configuration changed
301+
302+
**Solutions:**
303+
1. Verify the WMS endpoint configuration
304+
2. Regenerate QR code from WMS
305+
3. Manually verify endpoint URL
306+
4. Test endpoint connectivity with curl/browser
307+
308+
#### QR Code Security Concerns
309+
**Best Practices:**
310+
- Only scan QR codes from trusted sources
311+
- Verify the populated endpoint before saving
312+
- Use HTTPS endpoints in production
313+
- Monitor endpoint access logs for unauthorized attempts
314+
234315
### Network Configuration Issues
235316

236317
#### Cannot Connect to Server

0 commit comments

Comments
 (0)