bees4honey / mobile_vin_scanner

This is a repo for Mobile VIN Scanner created by bees4honey.
Other
73 stars 42 forks source link

Error when trying to run the scanner from phonegap app #9

Open Ollebolle opened 9 years ago

Ollebolle commented 9 years ago

Hi!

I'm trying to use this in a phonegap project using ionicframework (angularjs) like this:

  var scannerSuccess = function(result) {
    console.log(result);
  };
  var scannerFailure = function(message) {
    console.log(message);
  };

  $scope.scan = function() {
    window.plugins.VINBarcodeScanner.scan(scannerSuccess, scannerFailure);
  };

The result is nothing happening and my console shows the following message: TypeError: Cannot read property 'VINBarcodeScanner' of undefined

Any ideas on this?

Thank you!

nik123 commented 9 years ago

Hi!

Sorry for the long delay. The error message seems incomplete. Is it a full message or we can get more detailed one?

Anyway it seems like some plugin files are missing in your project. Not sure yet why exactly some files were not installed