if (iscan.length() == 54) { Toast.makeText(getApplicationContext(), "1", Toast.LENGTH_SHORT).show(); if (iscan.contains("(01)") && iscan.contains("(17)") && iscan.contains("(10)") && iscan.contains("(21)")) { //String igtin = String.valueOf(iscan.indexOf(iscan, 4)); Toast.makeText(getApplicationContext(), "2", Toast.LENGTH_SHORT).show(); String igtin = iscan.substring(4, 18); String iexpiry = iscan.substring(21, 27); String ibatch = iscan.substring(31, 37); String sSerialNo = iscan.substring(41, 54); //String sGTINCode=iscan.substring(5,17); gtin.setText(igtin); expiry.setText(iexpiry); batch.setText(ibatch); serial.setText(sSerialNo); duplicateSecondary(sSerialNo); } } else { //Toast.makeText(getApplicationContext(), "Invalid Code", Toast.LENGTH_SHORT).show(); error.setText("Invalid Code is Scanned.. Please Scan a proper Bar Code"); error.setTextColor(Color.parseColor("#FFFFFF")); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)