I am having trouble adding BarcodeScanner to my android build, the error was plugin_not_installed.
The app compiled without any errors, but it outputs the error on runtime. I have also tried removing/adding the android folder but still no luck.
Does anyone know what was causing this?
Install:
npm install --save @ionic-native/[email protected]
app.module.ts:
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
@NgModule({
...
providers: [
...
BarcodeScanner
...
]
...
})
home.ts:
import { BarcodeScanner, BarcodeScannerOptions } from '@ionic-native/barcode-scanner/ngx';
@Component({
...
})
export class HomePage implements OnInit {
private options: BarcodeScannerOptions;
constructor(private barcodeScanner: BarcodeScanner) {}
scan() {
this.options = {
prompt: "Scan your qrcode "
}
this.barcodeScanner.scan(this.options).then((barcodeData) => {
...
}, err => {
console.log("Error occured : " + err);
});
}//func scan
}//class HomePage
======
Dependencies: