title: Barcode Scanner (ZXing) crashing
body: <p>First off i want to tell you i have done all i can. Followed like 10 tutorials on internet and 10 threads on stacked. Still no success.</p>
  
  <p>I know guys that you recommend using scanning via intent,but in my case its not an option and i need to have it native in my app.</p>
  
  <p>I have downloaded the zxing library (2.1) and followed <a href="http://phpmyweb.net/2012/07/18/integrating-zxing-in-your-android-app-as-standalone-scanner/" rel="nofollow noreferrer">this tutorial</a></p>
  
  <p>When i run this code on my Galaxy S3 or Galaxy Tab 10.1 as debug, the program crashes, after freezing for like 20 seconds, when i click the button that should start intent for result: <code>com.google.zxing.client.android.SCAN</code> or <code>com.google.zxing.client.android.CaptureActivity</code>.</p>
  
  <p>Note that i have copied all the resources from Barcode Scanner app like beep sound, xml files and other.</p>
  
  <p><a href="http://pastebin.com/CvuusVbc" rel="nofollow noreferrer">Crash Log</a></p>
  
  <p>My code is below:</p>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>package com.example.philipscan;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.content.Intent;
  import android.util.Log;
  import android.view.Menu;
  import android.view.View;
  
  public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
      public void scanNow(View view)
      {
          Log.e("test", "button works!");
  
          Intent intent = new Intent("com.google.zxing.client.android.CaptureActivity");
          startActivityForResult(intent, 3);
      } 
  
      public void onActivityResult(int requestCode, int resultCode, Intent intent) 
      {
          Log.e("xZing", "Back");
          if (requestCode == 3) 
          {
              if (resultCode == RESULT_OK)
              {
                  String contents = intent.getStringExtra("SCAN_RESULT");
                  String format = intent.getStringExtra("SCAN_RESULT_FORMAT");
                  Log.e("xZing", "contents: "+contents+" format: "+format);
                  // Handle successful scan
              } 
              else if (resultCode == RESULT_CANCELED)
              {
                  // Handle cancel
                  Log.e("xZing", "Cancelled");
              }
          }
      }
  }
  </code></pre>
  
  <p><strong>Android Manifest</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.philipscan"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="17" /&gt;
  
          &lt;uses-feature android:name="android.hardware.camera"/&gt;
            &lt;uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/&gt;
            &lt;uses-feature android:name="android.hardware.camera.flash" android:required="false"/&gt;
            &lt;uses-feature android:name="android.hardware.screen.landscape"/&gt;
            &lt;uses-feature android:name="android.hardware.wifi" android:required="false"/&gt;
            &lt;uses-feature android:name="android.hardware.touchscreen" android:required="false"/&gt;
  
          &lt;uses-permission android:name="android.permission.CAMERA"/&gt;
          &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
          &lt;uses-permission android:name="android.permission.VIBRATE"/&gt;
          &lt;uses-permission android:name="android.permission.FLASHLIGHT"/&gt;
          &lt;uses-permission android:name="android.permission.READ_CONTACTS"/&gt;
          &lt;uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"/&gt;
          &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;
          &lt;uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/&gt;
          &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/&gt;
      &lt;application
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.example.philipscan.MainActivity"
              android:label="@string/app_name" &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;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;
          &lt;activity
              android:name="com.google.zxing.client.android.CaptureActivity"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&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;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p><strong>My SRC folder</strong></p>
  
  <p><img src="https://i.stack.imgur.com/4g1TI.jpg" alt="My file list"></p>
  
  <p>I'm very thankful for all the help i can get.</p>