Finish v1_11_7(126)
This commit is contained in:
commit
34efd8ad01
@ -17,8 +17,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 125
|
def appVersionCode = 126
|
||||||
def appVersionName = '1.11.6'
|
def appVersionName = '1.11.7'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
@ -95,9 +95,9 @@ dependencies {
|
|||||||
})
|
})
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
implementation 'com.orhanobut:logger:2.2.0'
|
implementation 'com.orhanobut:logger:2.2.0'
|
||||||
implementation 'com.google.firebase:firebase-core:17.2.1'
|
implementation 'com.google.firebase:firebase-core:17.2.2'
|
||||||
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
||||||
implementation 'com.google.firebase:firebase-perf:19.0.3'
|
implementation 'com.google.firebase:firebase-perf:19.0.5'
|
||||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import android.view.LayoutInflater;
|
|||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseDialog;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||||
@ -32,7 +33,7 @@ import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
|||||||
public class DialogScanArt {
|
public class DialogScanArt {
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private Dialog mDialog;
|
private BaseDialog mDialog;
|
||||||
|
|
||||||
private RunnableArgsss<DialogConsts.Results, MtbAart, Ean128Model> mOnItemChoosed;
|
private RunnableArgsss<DialogConsts.Results, MtbAart, Ean128Model> mOnItemChoosed;
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ public class DialogScanArt {
|
|||||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||||
DialogScanArtBinding bindings = DataBindingUtil.inflate(inflater, R.layout.dialog_scan_art, null, false);
|
DialogScanArtBinding bindings = DataBindingUtil.inflate(inflater, R.layout.dialog_scan_art, null, false);
|
||||||
|
|
||||||
mDialog = new Dialog(context);
|
mDialog = new BaseDialog(context);
|
||||||
|
|
||||||
mDialog.setContentView(bindings.getRoot());
|
mDialog.setContentView(bindings.getRoot());
|
||||||
|
|
||||||
@ -73,6 +74,7 @@ public class DialogScanArt {
|
|||||||
.setOnScanSuccessfull(onScanSuccessfull)
|
.setOnScanSuccessfull(onScanSuccessfull)
|
||||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(context, ex, false)));
|
.setOnScanFailed(ex -> UtilityExceptions.defaultException(context, ex, false)));
|
||||||
|
|
||||||
|
mDialog.setBarcodeListener(true);
|
||||||
mDialog.setOnDismissListener(dialog -> {
|
mDialog.setOnDismissListener(dialog -> {
|
||||||
BarcodeManager.removeCallback(barcodeIstanceID);
|
BarcodeManager.removeCallback(barcodeIstanceID);
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
|
|||||||
@ -110,6 +110,15 @@ public class KeyboardEmulatorBarcodeReader implements BarcodeReaderInterface {
|
|||||||
} catch (WrongFormatException e) {
|
} catch (WrongFormatException e) {
|
||||||
return BarcodeType.CODE128;
|
return BarcodeType.CODE128;
|
||||||
}
|
}
|
||||||
|
} else if (barcode.length() == 14) {
|
||||||
|
try {
|
||||||
|
int checksum = getEanChecksum(barcode);
|
||||||
|
if (checksum == Integer.parseInt(barcode.substring(13))){
|
||||||
|
return BarcodeType.INTERLEAVED_2OF5;
|
||||||
|
}
|
||||||
|
} catch (WrongFormatException e) {
|
||||||
|
return BarcodeType.CODE128;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return BarcodeType.CODE128;
|
return BarcodeType.CODE128;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user