Risolto bug della chiusura del collo in vendita tramite tasto Back

This commit is contained in:
2019-02-21 17:00:33 +01:00
parent 17d2e7f980
commit 10c77362b8
11 changed files with 194 additions and 166 deletions

View File

@@ -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);