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?
