This document describes the managed configuration (app restrictions) implementation for AI MultiBarcode Capture application. The managed configuration allows EMM/MDM administrators to remotely configure the app settings.
The app supports managed configuration through Android's Application Restrictions framework. When deployed in an enterprise environment, administrators can configure app settings centrally through their EMM/MDM solution.
The managed configuration is organized into the following sections:
- Prefix (
prefix): Default prefix for exported files (string) - Extension (
extension): Default file type for exports (choice: .txt, .csv, .xlsx) - Language (
language): Default language for the application interface (dropdown with all supported languages) - Processing Mode (
processing_mode): Select data processing mode (choice: file, https_post)- File Mode: Save barcode data to local files for manual export
- HTTP/HTTPS Post Mode: Upload barcode data directly to web management system
HTTP/HTTPS endpoint settings are organized in a nested bundle called https_configuration. This provides centralized configuration for enterprise web management system integration:
- HTTP/HTTPS Endpoint (
https_endpoint): Server endpoint URL for uploading barcode data (string)- Example:
http://192.168.1.100:3500/api/barcodes.php(for local web management system) - Example:
https://yourcompany.com/barcode/api/upload(for cloud deployment)
- Example:
All advanced AI and camera settings are organized in a nested bundle called advanced_settings. This provides a clean, organized configuration experience for enterprise administrators:
- Model Input Size (
model_input_size): AI model input resolution (choice: SMALL, MEDIUM, LARGE)- SMALL (640x640): Fastest processing, best for large or close-up barcodes
- MEDIUM (1280x1280): Balanced speed and accuracy for general use
- LARGE (1600x1600): Slower processing, optimal for small, damaged, or distant barcodes
- Camera Resolution (
camera_resolution): Camera capture resolution (choice: MP_1, MP_2, MP_4, MP_8)- 1MP (1280x720): For large or close-up barcodes
- 2MP (1920x1080): General barcode scanning
- 4MP (2688x1512): Dense, faint, or small barcodes
- 8MP (3840x2160): Tiny, distant, or low-contrast barcodes
- Inference Type (
inference_type): AI processing unit selection (choice: DSP, GPU, CPU)- DSP (Digital Signal Processor): Best choice for optimal performance and battery life
- GPU (Graphics Processing Unit): For trial use if DSP not available
- CPU (Central Processing Unit): For trial use if DSP and GPU are not available
All barcode symbologies are organized in a nested bundle called barcode_symbologies. This allows administrators to see them as a collapsed group when editing the configuration, improving the management experience.
- Postal Barcodes: Australian Postal, Canadian Postal, Dutch Postal, Finnish Postal 4S, Japanese Postal, UK Postal, US Planet, US Postnet, US 4State, US 4State FICS, Mailmark
- 2D Matrix Codes: Aztec, Data Matrix, QR Code, Micro QR, MaxiCode, PDF417, Micro PDF, DotCode, Grid Matrix, Han Xin
- Linear 1D Barcodes: Code 39, Code 128, Code 93, Code 11, Codabar, MSI
- EAN/UPC Codes: EAN-8, EAN-13, UPC-A, UPC-E, UPC-E1
- GS1 DataBar: GS1 DataBar, GS1 DataBar Expanded, GS1 DataBar Limited, GS1 DataMatrix, GS1 QR Code
- 2 of 5 Variants: Chinese 2 of 5, Discrete 2 of 5, Interleaved 2 of 5, Matrix 2 of 5, Korean 3 of 5
- Composite Codes: Composite A/B, Composite C
- Other Codes: TLC39, Trioptic 39
app_restrictions.xml- Defines the managed configuration schemaManagedConfigurationReceiver.java- Handles configuration changes and updates SharedPreferencesAndroidManifest.xml- Registers the BroadcastReceiver and configuration metadataMainApplication.java- Applies managed configuration on app startup
- Configuration Reception: The
ManagedConfigurationReceiverlistens forACTION_APPLICATION_RESTRICTIONS_CHANGEDbroadcasts - Automatic Processing: When a new managed configuration is received, it automatically updates the app's SharedPreferences
- Startup Application: On app startup,
MainApplicationapplies any existing managed configuration - Settings Integration: The existing
SettingsActivitycontinues to work normally, reading from the same SharedPreferences
- Nested Bundle Structure: Advanced settings and barcode symbologies are grouped in collapsible bundles for better UX
- Real-time Configuration Updates: Settings changes automatically restart camera and AI components without full app restart
- Automatic Sync: Configuration changes are immediately applied to SharedPreferences
- Dynamic Activity Restart: Advanced settings changes trigger CameraXLivePreviewActivity restart for immediate effect
- Performance-Aware Descriptions: Each setting includes guidance for optimal use cases
- Logging: Comprehensive logging for debugging and monitoring including configuration update notifications
- Error Handling: Robust error handling with fallback to default values
- Startup Sync: Ensures configuration is applied even if the app wasn't running when changes were made
- Deploy the APK to your managed devices
- Configure App Restrictions through your EMM/MDM console:
- Set the file prefix (e.g., "Company_Scan_")
- Choose default export format (.txt, .csv, or .xlsx)
- Select default application language from the dropdown (supports 72 languages plus system default)
- Select processing mode (File-based or HTTP/HTTPS Post mode)
- Expand the "HTTP/HTTPS Configuration" section to configure web management system endpoint:
- Set HTTP/HTTPS endpoint URL for real-time data upload
- Expand the "Advanced Settings" section to configure AI and camera settings:
- Set optimal model input size based on barcode types and performance requirements
- Choose appropriate camera resolution for scanning environment
- Select inference processor type based on device capabilities
- Expand the "Barcode Symbologies" section to configure which barcode types are enabled
- Push Configuration to devices
- Verify Application: The app will automatically apply the new settings and show a toast notification
{
"prefix": "CompanyScans_",
"extension": ".xlsx",
"language": "fr",
"processing_mode": "https_post",
"https_configuration": {
"https_endpoint": "http://192.168.1.100:3500/api/barcodes.php"
},
"advanced_settings": {
"model_input_size": "MEDIUM",
"camera_resolution": "MP_2",
"inference_type": "DSP"
},
"barcode_symbologies": {
"CODE39": true,
"CODE128": true,
"QRCODE": true,
"DATAMATRIX": true,
"EAN_13": true,
"UPC_A": true,
"PDF417": false,
"AZTEC": false
}
}- Use ADB to set restrictions:
adb shell am start-activity -e restrictionsPackage com.zebra.ai_multibarcodes_capture - Use a test EMM solution
- Deploy through Android Enterprise
- Check app logs for "ManagedConfigReceiver" entries
- Verify SharedPreferences are updated
- Confirm SettingsActivity reflects the managed configuration
- Backwards Compatibility: Apps without managed configuration continue to work with default settings
- User Override: Managed configuration takes precedence over user settings
- Performance: Configuration updates are applied asynchronously to avoid blocking the UI
- Security: No sensitive data is exposed through the configuration interface
-
Configuration Not Applied:
- Check EMM/MDM logs for deployment status
- Verify app is in work profile (if using work profiles)
- Check device logs:
adb logcat | grep ManagedConfig
-
Settings Not Updating:
- Verify the restriction keys match exactly
- Check bundle structure for barcode symbologies
- Ensure the app has been restarted after configuration changes
-
Default Values:
- If no managed configuration is present, the app uses built-in defaults
- Default values match the original app behavior
For technical support with managed configuration deployment, please refer to:
- Your EMM/MDM vendor documentation
- Android Enterprise documentation
- App-specific logs (filter: "ManagedConfigReceiver")