title: android zxing integration
body: <p>Im trying to integrate zxing barcode scanner into my app.  I am not wanting to do it via an intent as i would like the app to be an all in one solution.  I understand the limitations this has but i dont really have an option on this one</p>
  
  <p>i have followed the following guide to integrate the code as a library into my project </p>
  
  <p><a href="http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/" rel="nofollow">http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/</a></p>
  
  <p>I am receiving a Null exception error with the following logcat .  If anyone knows much about the zxing code could give me any pointers  that would be great.  let me know if you require any more background info</p>
  
  <p>.  I am calling the scaner with the following</p>
  
  <pre><code>        Intent intent = new Intent("com.google.zxing.client.android.SCAN");
      intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
      startActivityForResult(intent, 0);
  
  
  
  12-28 06:41:57.464: W/dalvikvm(4301): threadid=3: thread exiting with uncaught exception (group=0x2aaca450)
  12-28 06:41:57.464: E/AndroidRuntime(4301): Uncaught handler: thread main exiting due to uncaught exception
  12-28 06:41:57.504: E/AndroidRuntime(4301): java.lang.RuntimeException: Unable to resume activity {com.discovery_scan.app/com.google.zxing.client.android.CaptureActivity}: java.lang.NullPointerException
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2950)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2965)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2516)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.app.ActivityThread.access$2200(ActivityThread.java:119)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.os.Handler.dispatchMessage(Handler.java:99)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.os.Looper.loop(Looper.java:123)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.app.ActivityThread.main(ActivityThread.java:4363)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at java.lang.reflect.Method.invokeNative(Native Method)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at java.lang.reflect.Method.invoke(Method.java:521)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:885)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:643)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at dalvik.system.NativeStart.main(Native Method)
  12-28 06:41:57.504: E/AndroidRuntime(4301): Caused by: java.lang.NullPointerException
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at com.google.zxing.client.android.CaptureActivity.onResume(CaptureActivity.java:178)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.app.Activity.performResume(Activity.java:3763)
  12-28 06:41:57.504: E/AndroidRuntime(4301):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2937)
  </code></pre>