title: How to integrate Zxing Barcode Scanner without installing the actual zxing app (cannot resolve symbol: .android.CaptureActivity)?
body: <p>I want to integrate zxing scanner into my app without needed of external application (zxing scanner from play store).  This is my code</p>
  
  <pre><code>Button scan = (Button) findViewById(R.id.scan_button);
  scan.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
          Intent intent = new Intent("com.google.zxing.client.android.SCAN");
          intent.setPackage("com.mypackage.app");
          intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
          startActivityForResult(intent, SCANNER_REQUEST_CODE);
      }
  });
  
  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent intent) {
      if (requestCode == SCANNER_REQUEST_CODE) {
          // Handle scan intent
          if (resultCode == Activity.RESULT_OK) {
              // Handle successful scan
              String contents = intent.getStringExtra("SCAN_RESULT");
              String formatName = intent.getStringExtra("SCAN_RESULT_FORMAT");
              byte[] rawBytes = intent.getByteArrayExtra("SCAN_RESULT_BYTES");
              int intentOrientation = intent.getIntExtra("SCAN_RESULT_ORIENTATION", Integer.MIN_VALUE);
              Integer orientation = (intentOrientation == Integer.MIN_VALUE) ? null : intentOrientation;
              String errorCorrectionLevel = intent.getStringExtra("SCAN_RESULT_ERROR_CORRECTION_LEVEL");
  
          } else if (resultCode == Activity.RESULT_CANCELED) {
              // Handle cancel
          }
      } else {
          // Handle other intents
      }
  
  }
  </code></pre>
  
  
  
  <p><strong>AndroidManifest.xml</strong></p>
  
  <pre><code>&lt;activity android:name="com.google.zxing.client.android.CaptureActivity"
      android:screenOrientation="landscape"
      android:configChanges="orientation|keyboardHidden"
      android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
      android:windowSoftInputMode="stateAlwaysHidden"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="com.google.zxing.client.android.SCAN"/&gt;
          &lt;category android:name="android.intent.category.DEFAULT"/&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  </code></pre>
  
  
  
  <p>My Android Studio said that cannot resolve symbol: <code>.android.CaptureActivity</code> and if I run this, error happened </p>
  
  <blockquote>
    <p>java.lang.ClassNotFoundException: Didn't find class "com.google.zxing.client.android.CaptureActivity"</p>
  </blockquote>
  
  <p>What happened?</p>