EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase

Home Page:https://firebase.google.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class constructor ContentView cannot be invoked without 'new'

pkowalezyk opened this issue · comments

Hello,

I'm trying to integrade MLKitBarcodeScanner to my NativeScript 8.0.1 app with Vue.Js.

I added this to my main.js :

Vue.registerElement(
  'MLKitBarcodeScanner', () => require("nativescript-plugin-firebase/mlkit/barcodescanning").MLKitBarcodeScanner
);

And this to my app component :

<MLKitBarcodeScanner
    width="260"
    height="380"
    beepOnScan="true"
    formats="QR_CODE"
    preferFrontCamera="false"
    supportInverseBarcodes="false"
    @scanResult="onScanResult">
</MLKitBarcodeScanner>

However, I got the following errors while running with Android emulator :

chromium: [ERROR:web_contents_delegate.cc(218)] WebContentsDelegate::CheckMediaAccessPermission: Not supported.

While I added these lines to my AndroidManifest.xml as required :

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />

I also receive the following error :

TypeError: Class constructor ContentView cannot be invoked without 'new'

Am I missing something ?

Thanks for your help.