No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Cordova Barcode Scanner does not work

    Help
    4
    4
    1347
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vikram last edited by

      Hello ,

      So I was able to create a project successfully and deployed to my phone . but I am using a cordova plugin .

      So when I try to access this plugin I get following error

       vendor.js:11 Uncaught TypeError: e.$parent.close is not a function
          at click (vendor.js:11)
          at HTMLButtonElement.t (vendor.js:6)
      
      

      MY Code looks like this

      methods:{
          scanQR () {
            this.cordova.plugins.barcodeScanner.scan(
              result => {
                if (result.cancelled) {
                  Toast.create('QR code scanning aborted...')
                  return
                }
              },
              error => {
                Toast.create('error');
                Dialog.create({
                  message: 'Failed to scan the QR code: ' + error
                })
              }
            )
          }
      }
      
      1 Reply Last reply Reply Quote 0
      • J
        JCharante last edited by

        What does the content of your <template> tag look like?

        1 Reply Last reply Reply Quote 0
        • G
          genuinefafa last edited by

          it seems like this is the example https://github.com/vikramIde/stock_scan1 it might help somebody else reaching here.
          pst: it’s using a pretty old version of quasar doh

          1 Reply Last reply Reply Quote 0
          • patryckx
            patryckx last edited by

            @vikram
            I used it this way in a quasar version 0.15 project and it worked fine.
            cordova without the “this”

               scan () {
                  cordova.plugins.barcodeScanner.scan(function (result) {
                    alert(result.text)
                   }, function (error) { alert(error) })
                }
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post