Ionic cordova-plugin-qrscanner has no camera preview

Story5 picture Story5 · Jul 26, 2017 · Viewed 14.2k times · Source

I run a simple demo to use cordova-plugin-qrscanner, it can scan qrcode but no camera preview.

qrscannerDemo on Github

Related code blow:

I run the ionic project on android then click the button but nothing happened and no camera preview show.

I test the project again and find it can scan qrcode and get the result test, but no camera preview.

I search the problem, someone says should to set the body and any elements transparent. I try but does not work.

Android. Nothing appears on screen. #35

AnyOne help?

Answer

jesusverma picture jesusverma · Aug 1, 2017

In top level index.html:

<ion-app style="background: none transparent;"></ion-app>

In camera display page html file:

<ion-content style="background: none transparent;">