Risolto bug della chiusura del collo in vendita tramite tasto Back
This commit is contained in:
@@ -5,6 +5,8 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import device.common.DecodeResult;
|
||||
import device.common.ScanConst;
|
||||
import device.sdk.ScanManager;
|
||||
@@ -91,9 +93,15 @@ public class PointMobileBarcodeReader implements BarcodeReaderInterface {
|
||||
}
|
||||
|
||||
if(mDecodeResult != null) {
|
||||
String stringValue = null;
|
||||
|
||||
if(mDecodeResult.decodeValue != null && mDecodeResult.decodeValue.length > 0) {
|
||||
stringValue = new String(mDecodeResult.decodeValue, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
BarcodeScanDTO barcodeScanDTO = new BarcodeScanDTO()
|
||||
.setByteValue(mDecodeResult.decodeValue)
|
||||
.setStringValue(mDecodeResult.toString().replaceAll("\n", "").replaceAll("\r", "").trim())
|
||||
.setStringValue(stringValue)
|
||||
.setType(BarcodeType.fromInt(mDecodeResult.symType))
|
||||
.setName(mDecodeResult.symName)
|
||||
.setDecodingTime(mDecodeResult.decodeTimeMillisecond);
|
||||
|
||||
Reference in New Issue
Block a user