Stay on the Barcode Page after scan result

I am using the BarcodeScanner from ‘@ionic-native/barcode-scanner’. it works well but as soon as it finishes scanning, the barcode scanner page closes itself.
I need the scan page to stay on until the user scans the right barcode. Is there any way to achieve this?
this is my code :
this.barcodeScanner.scan().then((barcodeData) => {
// Some Code
},error => {
let alert = this.alertCtrl.create({
message: ‘NOT FOUND’ ,
buttons: [‘OK’]

How do you know what is the right barcode?
And if you want to do that so in the barcode response check if is the right barcode if not open again the barcode scanner