|
|
@ -106,8 +106,8 @@ public class BarcodeHelper { |
|
|
|
* can be constructed for it |
|
|
|
* can be constructed for it |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static String handleScanResult(int resultCode, Intent data, boolean supportsSearch) { |
|
|
|
public static String handleScanResult(int resultCode, Intent data, boolean supportsSearch) { |
|
|
|
String contents = data.getStringExtra("SCAN_RESULT"); |
|
|
|
String contents = data != null? data.getStringExtra("SCAN_RESULT"): null; |
|
|
|
String formatName = data.getStringExtra("SCAN_RESULT_FORMAT"); |
|
|
|
String formatName = data != null? data.getStringExtra("SCAN_RESULT_FORMAT"): null; |
|
|
|
if (formatName != null && formatName.equals("QR_CODE")) { |
|
|
|
if (formatName != null && formatName.equals("QR_CODE")) { |
|
|
|
// Scanned barcode was a QR code: return the contents directly
|
|
|
|
// Scanned barcode was a QR code: return the contents directly
|
|
|
|
return contents; |
|
|
|
return contents; |
|
|
|