urovosamples / SDK_ReleaseforAndroid

This repository contains all the samples files for Urovo Android Smart POS Payment Terminal;Handheld Data Terminal, including the revision history.
53 stars 25 forks source link

Not reciver Data when scanner QRCode #19

Open phuquy2114 opened 1 year ago

phuquy2114 commented 1 year ago

Hi Team I have a problem. I don't have received the data result when scanner the QRcode by DT50 Devices.

It doesn't the listener function
// Get scan results, including string and byte data etc. byte[] barcode = intent.getByteArrayExtra(DECODE_DATA_TAG); int barcodeLen = intent.getIntExtra(BARCODE_LENGTH_TAG, 0); byte temp = intent.getByteExtra(BARCODE_TYPE_TAG, (byte) 0); String barcodeStr = intent.getStringExtra(BARCODE_STRING_TAG); if (mScanCaptureImageShow) { // Request images of this scan context.sendBroadcast(new Intent(ACTION_DECODE_IMAGE_REQUEST)); } LogI("barcode type:" + temp); String scanResult = new String(barcode, 0, barcodeLen); // print scan results. scanResult = " length:" + barcodeLen + "\nbarcode:" + scanResult + "\nbytesToHexString:" + bytesToHexString(barcode) + "\nbarcodeStr:" + barcodeStr; Message msg = mHandler.obtainMessage(MSG_SHOW_SCAN_RESULT); msg.obj = scanResult; mHandler.sendMessage(msg);