Hi everyone,
Running my app on Ionic view I can’t reuse the barcode scanner process when it’s called the second time (it freeze the app).
Here is my code :
In the controller
constructor(public navCtrl: NavController) {
this.scan();
}
scan() {
BarcodeScanner.scan().then((barcodeData) => {
alert(bardcodeData.text);
}, (err) => {
alert(err);
});
}
In the view :
<ion-header>
<ion-navbar>
<ion-title>
Scan
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<button ion-button full (click)="scan()">Rescan</button>
</ion-content>
Do you know why the barcode scan freeze when it’s used the second time (when I click on the button) ? Did I miss something ?