blackberry / WebWorks-Community-APIs

Community owned repository containing JavaScript Extensions for BlackBerry WebWorks
Apache License 2.0
140 stars 204 forks source link

com.blackberry.community.barcodescanner example on github doesn't seem to work with webworks 2.2 UI #396

Closed rhildred closed 9 years ago

rhildred commented 9 years ago

I teach at Conestoga College. Last year around this time, I had a student successfully use this plugin. This year, when I try to use the sample from the www directory:

app.barcodeScanner = window.plugins.barcodeScanner app.barcodeScanner.startRead(app.codeFound, app.errorFound)

I get an exception: 'undefined' is not an object (evaluating 'window.plugins.barcodeScanner')

I am doing a multiplatform project with my class, using com.phonegap.plugins.barcodescanner for ios, wp8, android. I think that I need to use com.blackberry.community.barcodescanner for BB10, which we really want to get working as the customer has a bb10.

timwindsor commented 9 years ago

How did you add the plugin to your application?

rhildred commented 9 years ago

Hi Tim:

I added the plugin to my app with the plugins portion (left column) of the Webworks 2.2 UI. This was what I did last year too, so it never occurred to me to check the folder to see if it was actually added. I have students this afternoon, so I could check later tonight.

thanks

Rich

On Tue, Feb 3, 2015 at 1:56 PM, Tim Windsor notifications@github.com wrote:

How did you add the plugin to your application?

— Reply to this email directly or view it on GitHub https://github.com/blackberry/WebWorks-Community-APIs/issues/396#issuecomment-72711228 .

Richard Hildred +1.519.594.0900 | http://waterlooHildreds.blogspot.com | xmpp:// rhildred@gmail.com | skype: rhildred

timwindsor commented 9 years ago

I created a new test project using the GUI, deleted the www folder, copied in the files from the sample, and added the plugin using the id "com.blackberry.community.barcodescanner". When I built and tested, it ran successfully.

PKU7 commented 9 years ago

Hi Tim,

Rich and I tried your code and it does work. Thanks for guiding us in the right direction.

Regards, Praneet

timwindsor commented 9 years ago

That's great, glad it's working for you.

rhildred commented 9 years ago

Hi Again: Your code worked for us, and now our code works too. We had phonegap.js instead of cordova.js in our index.html. thanks again Rich and Praneet