+ savedException = re;
+ }
+
+ if (results.isEmpty()) {
+ try {
+ // Look for pure barcode
+ Result theResult = reader.decode(bitmap, HINTS_PURE);
+ if (theResult != null) {
+ results.add(theResult);
+ }
+ } catch (ReaderException re) {
+ savedException = re;
+ }
+ }
+
+ if (results.isEmpty()) {
+ try {
+ // Look for normal barcode in photo
+ Result theResult = reader.decode(bitmap, HINTS);
+ if (theResult != null) {
+ results.add(theResult);
+ }
+ } catch (ReaderException re) {
+ savedException = re;
+ }
+ }
+
+ if (results.isEmpty()) {
+ try {
+ // Try again with other binarizer
+ BinaryBitmap hybridBitmap = new BinaryBitmap(new HybridBinarizer(source));
+ Result theResult = reader.decode(hybridBitmap, HINTS);
+ if (theResult != null) {
+ results.add(theResult);
+ }
+ } catch (ReaderException re) {
+ savedException = re;
+ }
+ }
+
+ if (results.isEmpty()) {
+ handleException(savedException, response);