Hello,
Im running ionic v3, and doing some tests;
My plugins:
neptune:scanApp chris$ …/node_modules/ionic/bin/ionic cordova plugin ls
cordova plugin ls
cordova-plugin-camera 4.0.3 “Camera”
cordova-plugin-qrscanner 2.6.0 “QRScanner”
neptune:scanApp chris$
The Camera plugin is working fine, but when I try to use the QR Scanner , i get this error in console:
[app-scripts] [12:58:19] console.warn: Ionic Native: tried calling QRScanner.prepare, but the QRScanner plugin is not installed.
[app-scripts] [12:58:19] console.warn: Install the QRScanner plugin: 'ionic cordova plugin add cordova-plugin-qrscanner'
[app-scripts] [12:58:19] console.log: Error is plugin_not_installed
Installed via this link:
https://ionicframework.com/docs/native/qr-scanner/
Im using IonicAppDev on Ios.
app.module.ts:
import { Camera } from '@ionic-native/camera';
import { QRScanner } from '@ionic-native/qr-scanner';
...
providers: [
StatusBar,
SplashScreen,
Camera,
QRScanner,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
the page:
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';
import { Camera, CameraOptions } from '@ionic-native/camera';
@Component({
selector: 'page-about',
templateUrl: 'about.html'
})
export class AboutPage {
currentImage: any;
constructor(public navCtrl: NavController, private camera: Camera, private qrScanner: QRScanner) {
}
takePicture() {
this.qrScanner.prepare()
......
When clicking on the button, it fires takePicture(). And then im getting that error… ANy one?