honeywell_scanner 패키지는 Honeywell PDA Android 장치에서 바코드 스캔을 가능하게 하는 Flutter 플러그인입니다. Honeywell의 하드웨어 전용 스캔 기능과 원활하게 통합되어 Flutter 애플리케이션 내에서 바코드를 효율적으로 캡처할 수 있도록 합니다. 신뢰성 있고 빠른 스캔 성능을 보장하기 위해 네이티브 Android API를 활용합니다. 강력한 모바일 데이터 수집 솔루션이 필요한 기업 환경에 적합합니다.
사용 사례
재고 관리
자산 추적
창고 운영
현장 서비스 데이터 입력
주요 기능
네이티브 히وني웰 PDA 통합
실시간 바코드 스캔
저지연 성능
Android 전용 지원
통합을 위한 간단한 API
적합한 대상
기업 모바일 앱
물류 및 공급망
산업 데이터 수집
혼웨일 장치 사용자
고려 사항
안드로이드 전용
호니웰 PDA 하드웨어 필요
특정 기기 모델에만 제한됨
iOS 지원 없음
적절한 장치 구성이 필요합니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
This is a plugin to scan barcodes by using Honeywell PDA Android devices.
About Honeywell SDK
This plugin uses the native Android SDK available in the Technical Support Downloads Portal for honeywell devices, note that you will need to create an account to download any Honeywell software.
From there you will be able to download the Honeywell_MobilitySDK_Android_vx.xx.zip which contains the Android Data Collection SDK that is the one used in this plugin.
The Honeywell_MobilitySDK_Android is located in Software -> Software and tools -> Developer Library -> SDKs for Android
Inside the .zip file you will find the Android Data Collection SDK that contains the DataCollection.aar library with sample code, pdf and html documentation enough to understand and work with the Android Data Collection SDK
Mobility SDK version: 1.00.00.0135
Data collection SDK version: 1.97.00.0026
Note: You do not have to do anything from the description above to be able to use this plugin, it's just a guide for the ones that need to know the source of truth.
If your device doesn't show up in the list above, give it a try anyway...
Migration instructions
From any version prior to ^4.0.0+14 you must:
Rename any mention of ScannerCallBack to ScannerCallback in your code.
setScannerCallBack function is no longer available in HoneywellScanner, if you need to set a scanner callback after scanner constructor you can use the scannerCallback set property.
Change the override of the onDecode function to receive a ScannedData object instead of a String.
ScannedData object contains the scanned code and other info related to the scanned code.
From any version prior to ^7.0.0 you must:
scannerCallback, onScannerDecodeCallback and onScannerErrorCallback properties are now functions setScannerCallback(...), setScannerDecodeCallback(...), setScannerErrorCallback(...).
Call disposeScanner() instead of stopScanner() when no longer need to use a scanner instance.
How to use
First
Run this command:
flutter pub add honeywell_scanner
This will add honeywell_scanner to your pubspec.yaml dependencies like:
honeywell_scanner:^latest_version
Then run flutter pub get to download the library sources to your pub-cache.
Second
Copy the honeywell folder which is inside the example code sources at:
into your android project module which is going to use this plugin. This step is necessary and crucial because the Honeywell Data Collection Android library is a bundle .aar which has to be referenced as a project library.
Third
Add this include ':honeywell' to your settings.gradle in your android project module to allow the plugin to locate the honeywell.aar library.
Fourth
Add tools:replace="android:label" under application tag in your AndroidManifest.xml, this is required because the honeywell.aar library defines an android:label="@string/app_name" which conflicts with your project's label resulting in a Manifest merger failed error.
If error remains, you should check if xmlns:tools="http://schemas.android.com/tools" is missing in the manifest block.
You can set the scanner callback listeners after constructor like:
honeywellScanner.setScannerCallback(this);
Or
honeywellScanner.setScannerDecodeCallbac((scannedData) {
// Do something here
});
honeywellScanner.setScannerErrorCallback((error) {
// Do something here
});
Setting properties. By default honeywell_scanner sets properties to support all code formats from CodeFormat enum, it also sets the trigger control property to autoControl and disables browser launching when scanning urls.
However you can set any property you want by using the honeywellScanner.setProperties(properties) in case you need some specific behavior from the scanner.
Properties are represented as a Map<String, dynamic>, so for instance if you want the scanner only scans 1D codes and you want the scanned EAN-13 bar codes to include the last digit (the check digit) and want the scanned Codabar bar codes to include the start/stop digits; then you must set it on properties like:
List<CodeFormat> codeFormats = CodeFormatUtils.ALL_1D_FORMATS;
Map<String, dynamic> properties = {
...CodeFormatUtils.getAsPropertiesComplement(codeFormats), //CodeFormatUtils.getAsPropertiesComplement(...) this function converts a list of CodeFormat enums to its corresponding properties representation.'DEC_CODABAR_START_STOP_TRANSMIT': true, //This is the Codabar start/stop digit specific property'DEC_EAN13_CHECK_DIGIT_TRANSMIT': true, //This is the EAN13 check digit specific property
};
honeywellScanner.setProperties(properties);
IMPORTANT:
To know and understand the full list of supported properties you may check the Honeywell SDK documentation (to get SDK documentation read the About Honeywell SDK at the beginning of this README).
Anyway you can check a quick documentation in the doc folder on this plugin where you can find the BarcodeReader.html explaining all about barcode reader including properties and the BarcodeReaderProperties.java where you can find all the property values you can set.
Start scanner listener, at this point the app will be listening for any scanned code when you press the physical PDA button or your in-app button to scan codes:
honeywellScanner.startScanner();
Stop scanner listener, this will release and close the scanner connection:
honeywellScanner.stopScanner();
Check if scanner is already started:
honeywellScanner.isStarted();
You can also do a scanner.pauseScanner() or scanner.resumeScanner() depending on your app life cycle state.
Start scanning, this function activates the scanner sensor to scan codes. This is the same as pressing the PDA physical button:
honeywellScanner.startScanning();
Stop scanning, it cancels the scanning:
honeywellScanner.stopScanning();
Dispose scanner, this function does multiple things:
Removes the scanning callback
Stops the scanner to release the connection
Resumes any previous scanner instance state
Use this function when you are done with an instance of the scanner.
honeywellScanner.disposeScanner();
Notes:
Both startScanning() and stopScanning() uses the softwareTrigger(bool state) function where state = true means scanning and state = false menas not scanning
It's recommended to check the example code for a better idea of how to work with this plugin.
[IMPORTANT] This plugin allows to create different instances of the scanner, so you can have multiple scanner instances in your app, but you must be careful with this because the channel communication with the native code is only one. So when you are working with different scanner instances in different Screens in your app make sure to call to disposeScanner() when you are done with it to avoid issues with the state of the previous instances of the scanner. Take a look at the example code to see how multiple instances of the scanner can work in different screens.