title: How to redirect to web page using URL in QR Code?
body: <p>I'm creating a qr code scan application. I used ZXing library.
  How to redirect to web page using URL in QR Code?
  I want to use my application to redirect to web page ( not use browser ). Please help me
  This is my code.</p>
  
  <p>ScanActivity.java</p>
  
  <pre><code>package app.num.barcodescannerproject;
  
  import android.app.AlertDialog;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.View;
  
  import com.google.zxing.Result;
  import me.dm7.barcodescanner.zxing.ZXingScannerView;
  
  public class MainActivity extends AppCompatActivity implements ZXingScannerView.ResultHandler {
  private ZXingScannerView mScannerView;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  }
  
  public void QrScanner(View view){
  
  
      mScannerView = new ZXingScannerView(this);   // Programmatically initialize the scanner view
      setContentView(mScannerView);
  
      mScannerView.setResultHandler(this); // Register ourselves as a handler for scan results.
      mScannerView.startCamera();         // Start camera
  
  }
  
  @Override
  public void onPause() {
      super.onPause();
      mScannerView.stopCamera();           // Stop camera on pause
  }
  
  @Override
  public void handleResult(Result rawResult) {
      // Do something with the result here
  
      Log.e("handler", rawResult.getText()); 
      Log.e("handler", rawResult.getBarcodeFormat().toString()); 
  
      AlertDialog.Builder builder = new AlertDialog.Builder(this);
      builder.setTitle("Kết quả :");
      builder.setMessage(rawResult.getText());
      AlertDialog alert1 = builder.create();
      alert1.show();
  
  
    mScannerView.resumeCameraPreview(this);
  }
  }
  </code></pre>
  
  <p>main.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context="app.num.barcodescannerproject.MainActivity"&gt;
  
  &lt;Button android:layout_height="wrap_content"
      android:layout_width="match_parent"
      android:text="QRScanner"
      android:onClick="QrScanner" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>ActivityMainfest.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="app.num.barcodescannerproject"&gt;
  &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme"&gt;
      &lt;activity android:name=".MainActivity"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>