title: Android Studio QR Code Scanner Zxing. How can I open the Result of the QR Code scan (URL Link) within my Application?
body: <p>How do I need to change the <code>HandleResult</code> code for opening the URL within the application and not in the external browser?</p>
  
  <p>I know that we need something like Webview and the layout file also needs to be in Webview. I hope someone can help me? I tried it but it didn't work.</p>
  
  <pre><code>package com.example.beverly.registrationdatabase;
  
  import android.content.Intent;
  import android.net.Uri;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.util.Patterns;
  
  import com.google.zxing.Result;
  
  import me.dm7.barcodescanner.zxing.ZXingScannerView;
  
  public class ScanCodeActivity extends AppCompatActivity implements ZXingScannerView.ResultHandler {
  
      ZXingScannerView ScannerView;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          ScannerView = new ZXingScannerView(this);
          setContentView(ScannerView);
  
  
      }
  
      @Override
      public void handleResult(Result result) {
  
          if(Patterns.WEB_URL.matcher(result.getText()).matches()) {
              // Open URL
              Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(result.getText()));
              startActivity(browserIntent);
              onBackPressed();
          }
      }
  
      @Override
      protected void onPause() {
          super.onPause();
  
          ScannerView.stopCamera();
      }
  
      @Override
      protected void onResume() {
          super.onResume();
  
          ScannerView.setResultHandler(this);
          ScannerView.startCamera();
      }
  }
  </code></pre>