I am getting barcode scanned value using dispatchKeyEvent with below source code and devices
Honeywell IHS320X (https://www.amazon.in/IMPACT-Honeywell-IHS320X-Barcode-Scanner/dp/B0C1VSH8GX)
Tvs BS-L100 (https://www.amazon.in/Tvs-BS-I100N-Barcode-Scanner-creators/dp/B07CNFB7N3)
@Override public boolean dispatchKeyEvent(KeyEvent event) { super.dispatchKeyEvent(event); if ( event.getAction() == KeyEvent.ACTION_DOWN) { if(event.getKeyCode() == KeyEvent.KEYCODE_ENTER){ handleBarcodeScan(scannedBarcode.toString()); scannedBarcode.setLength(0); return true; } else{ scannedBarcode.append(event.getDisplayLabel()); } } return true; }
But facing issue client's barcode scanner, Client is using Zebra DS2200 (https://www.zebra.com/us/en/products/scanners/general-purpose-handheld-scanners/ds2200-series.html)
Zebra DS2200 is able to scan with Clover Register app
Also added Broadcast receiver
<receiver android:name=".services.BarcodeScannerReceiver" android:enabled="true" android:exported="false"> <intent-filter> <action android:name="com.clover.sdk.action.CODE_SCAN" /> </intent-filter> </receiver>
Also tried below clover SDK example
Please let us know if missing anything else from my end
3 People are following this question.