Closed cyrushandwriting closed 2 years ago
Also, if the user uses the back button, it exits the app, can this be controlled in the BarcodeScanner side to call the stopScan?
Hello,
You can follow this: https://github.com/capacitor-community/barcode-scanner/issues/26#issuecomment-808862821
And then apply a scanner ui inside the div:
<div class="scanner-ui">
<ion-header translucent>
<ion-toolbar>
<ion-buttons slot="end">
<ion-button (click)="cancelScanning()">Cancel</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
</div>
and cancelScanning could be
cancelScanning() {
document.body.classList.remove("qrscanner");
BarcodeScanner.showBackground();
BarcodeScanner.stopScan();
}
I will close this issue since the Plugin comes with no UI by definition. This is currently not really well documented and some basic examples would make sense, but I just became a maintainer of this repo and it will take me a while to update the docs and add some examples.
` await BarcodeScanner.hideBackground(); // make background of WebView transparent