Hi. We "listen" for barcode scans in our WeighNPay app. It works on Clover station but on Clover Station 2018 we get nothing...crickets. Here is the relevant code:
public void useScanner(){ Log.d(TAG, "Starting listening to scanner") ;
IntentFilter filter = new IntentFilter(BarcodeResult.INTENT_ACTION); registerReceiver(mBarcodeReceiver, filter);
}
and
private final BroadcastReceiver mBarcodeReceiver = new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { if (jGlobal.barcodeEnabled) { BarcodeResult br = new BarcodeResult(intent); Log.d("SCANNER", "Received scan with result" + br.getBarcode()); final String barcode = br.getBarcode(); if (barcode == null) { return ; } parseBarcode(barcode) ; } } };
Can you help you figure out what is wrong? we have tried everything we can think of and are out of options. We never get an intent