title: Ionic cordova-plugin-qrscanner has no camera preview
body: <p>I run a simple demo to use cordova-plugin-qrscanner, it can scan qrcode but no camera preview.</p>
  
  <p><a href="https://github.com/Story5/qrscannerdemo" rel="noreferrer">qrscannerDemo on Github</a></p>
  
  <p>Related code blow:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Component } from '@angular/core';
  import { NavController } from 'ionic-angular';
  
  
  import { AndroidPermissions } from '@ionic-native/android-permissions';
  import { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';
  
  @Component({
    selector: 'page-home',
    templateUrl: 'home.html'
  })
  export class HomePage {
  
    constructor(public navCtrl: NavController,
                public androidPermissions: AndroidPermissions,
                public qrScanner: QRScanner) {
  
    }
  
    qrscanner() {
  
      // Optionally request the permission early
      this.qrScanner.prepare()
        .then((status: QRScannerStatus) =&gt; {
          if (status.authorized) {
            // camera permission was granted
            alert('authorized');
  
            // start scanning
            let scanSub = this.qrScanner.scan().subscribe((text: string) =&gt; {
              console.log('Scanned something', text);
              alert(text);
              this.qrScanner.hide(); // hide camera preview
              scanSub.unsubscribe(); // stop scanning
            });
  
            this.qrScanner.resumePreview();
  
            // show camera preview
            this.qrScanner.show();
  
            // wait for user to scan something, then the observable callback will be called
  
          } else if (status.denied) {
            alert('denied');
            // camera permission was permanently denied
            // you must use QRScanner.openSettings() method to guide the user to the settings page
            // then they can grant the permission from there
          } else {
            // permission was denied, but not permanently. You can ask for permission again at a later time.
            alert('else');
          }
        })
        .catch((e: any) =&gt; {
          alert('Error is' + e);
        });
  
    }
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ion-header&gt;
    &lt;ion-navbar transparent&gt;
      &lt;ion-title&gt;
        Ionic Blank
      &lt;/ion-title&gt;
    &lt;/ion-navbar&gt;
  &lt;/ion-header&gt; 
  
   &lt;ion-content padding style="background: none transparent;"&gt;
    &lt;button ion-button (click)="qrscanner()"&gt;qrscanner&lt;/button&gt;
  &lt;/ion-content&gt;  </code></pre>
  </div>
  </div>
  </p>
  
  <p><STRIKE> 
  I run the ionic project on android then click the button but nothing happened and no camera preview show.
  </STRIKE></p>
  
  <p>I test the project again and find it can scan qrcode and get the result test, but no camera preview.</p>
  
  <p>I search the problem, someone says should to set the body and any elements transparent. I try but does not work.</p>
  
  <p><a href="https://github.com/bitpay/cordova-plugin-qrscanner/issues/35" rel="noreferrer">Android. Nothing appears on screen. #35</a></p>
  
  <p>AnyOne help?</p>