0
 public void receiveDetections(final Detector.Detections<Barcode> detections) {
            final SparseArray<Barcode> barcodes = detections.getDetectedItems();
            if (barcodes.size() != 0) {
                barcodeInfo.post(new Runnable() {
                    @Override
                    public void run() {
                      barcodeInfo.setText(barcodes.valueAt(0).displayValue);
                        try {
                            Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
                            startActivity(browserIntent);
                        } catch (ActivityNotFoundException e) {
                            e.printStackTrace();
                        }
                    }
                });
            }
        }}
}

I have an android app which scans a QR code. On successful scanning, I am trying to open a web page but it open several web pages. Is there a way I can restrict it to open only one page. Also, is there a way I can open the web page in my android app only and not in my default browser?

AAA
  • 47
  • 2
  • 12
  • And [How to open URL in Android browser](http://stackoverflow.com/questions/2201917/how-can-i-open-a-url-in-androids-web-browser-from-my-application?rq=1) – OneCricketeer Nov 09 '16 at 21:20
  • `string1 + string2` will *append* `string2` onto `string1`... That is concatenation... I don't know what else you are trying to ask – OneCricketeer Nov 09 '16 at 21:21

0 Answers0