Add EAN_13 case

This commit is contained in:
jacques 2021-08-09 16:20:42 +02:00
parent fd5fe825e9
commit 934d6ae67b

View file

@ -273,7 +273,10 @@ public class DrugListActivity extends AppCompatActivity {
String cip13; String cip13;
// Handle successful scan // Handle successful scan
if (result.getFormatName().equals("CODE_128")) { //CODE_128
Log.d(TAG, "formatName = " + result.getFormatName());
if (result.getFormatName().equals("CODE_128") || (result.getFormatName().equals("EAN_13"))) { //CODE_128 || EAN 13
cip13 = result.getContents(); cip13 = result.getContents();
} else { } else {
cip13 = result.getContents().substring(4, 17); cip13 = result.getContents().substring(4, 17);