title: ZXing.Net not working on Xamarin Android
body: <p>Im trying to implement the ZXing.Net nuget package to read barcodes from my app.</p>
  
  <p>Im using the fragment version and it places correctly but it only shows the overlay, the camera image is just black.</p>
  
  <p>Ive searched about and only found something about the Flashlight permission...</p>
  
  <p>This is my code:</p>
  
  <pre><code>scannerFragment = new ZXingScannerFragment();
  //scannerFragment.CustomOverlayView = CustomOverlayView;
  scannerFragment.UseCustomOverlayView = false;
  scannerFragment.TopText = "";
  scannerFragment.BottomText = "";
  FindViewById(Resource.Id.imgBarcode).Visibility = ViewStates.Visible;
  SupportFragmentManager.BeginTransaction().Replace(Resource.Id.frameScanner, scannerFragment, "ZXINGFRAGMENT").Commit();
  MobileBarcodeScanningOptions ScanningOptions = new MobileBarcodeScanningOptions();
  ScanningOptions.PossibleFormats = new List&lt;ZXing.BarcodeFormat&gt; { ZXing.BarcodeFormat.EAN_8, ZXing.BarcodeFormat.CODE_128 };
  if (ScanningOptions.AutoRotate.HasValue &amp;&amp; !ScanningOptions.AutoRotate.Value)
  {
      RequestedOrientation = ScreenOrientation.Nosensor;              
  }
  scannerFragment.StartScanning(result =&gt;
  {
      var h = ScanCompletedHandler;
      if (h != null)
      {
          h(result);
      }
      if (!ZxingActivity.ScanContinuously)
      {
          SupportFragmentManager.BeginTransaction().Remove(scannerFragment);
      }
  }, ScanningOptions);
  </code></pre>
  
  <p>And i have this in the manifest:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
  &lt;uses-permission android:name="android.permission.FLASHLIGHT" /&gt;
  </code></pre>
  
  <p>I will be trying the activity way instead of the fragment, just in case it works.</p>
  
  <p>The camera of the device works fine, why im getting a black screen?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>It is working on the full-screen version using this code:</p>
  
  <pre><code>MobileBarcodeScanner.Initialize(Application);
  var scanner = new ZXing.Mobile.MobileBarcodeScanner();
  var result = await scanner.Scan();
  </code></pre>
  
  <p>Any idea why it does not work as a fragment?</p>