cfjedimaster / Cordova-Examples

A collection of Cordova/Ionic/etc demos.
982 stars 1.07k forks source link

Barcode is not working,What am I doing wrong. #16

Closed ramrattle closed 8 years ago

ramrattle commented 8 years ago

Created a new folder using phonegap create, included the plugin using cordova command line and the plugin is present in plugin folders, replaced hello word www folder with whatever is give here, when I fireup the app I see the start scan button but after clicking that nothing happens...can someone pls help

cfjedimaster commented 8 years ago

When you remote debug, what do you see?

ramrattle commented 8 years ago

Hi, Im newbie, really don't know how to remote debug, but this is what I did

  1. phonegap create box
  2. cordova plugins add https://github.com/wilbeast/BarcodeScanner.git
  3. Replace www folder with www folder of barcode
  4. phonegap run android
  5. phonegap serve
  6. getting this in console [phonegap] starting app server... [phonegap] listening on 192.168.0.5:3000 [phonegap] [phonegap] ctrl-c to stop the server [phonegap] [phonegap] 200 /api/appzip [phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1438094954468-2&sid=3MtbWS5Jp_UgM9yTAAAA [phonegap] 200 /api/autoreload [phonegap] 200 /api/autoreload [phonegap] 200 /api/autoreload

I have attached the whole folder in this dropbox mail, will be really helpful if you go through it... https://www.dropbox.com/sh/jn5aq9pw3e2fl3z/AACbcaKoriYzuSd5d1YgH41Da?dl=0

Many a thanks

cfjedimaster commented 8 years ago

Ah, you are running in the browser. You need to run this on a device.

ramrattle commented 8 years ago

Hi, Yes this was run on device only, I ran phonegap serve in my macbook and connected my android phone to the same network and gave the ip and port in the phonegap android app, I see the start scan button but nothing happens when I click it. Please help.

cfjedimaster commented 8 years ago

So your using the PhoneGap app. As you may know, or maybe not, the PhoneGap app doesn't support custom plugins. You have to use the CLI to send it to your device.

ramrattle commented 8 years ago

Sorry, I'm not aware of that, it will be really helpful if you tell me how to do it or point to an article...again thanks for your response

cfjedimaster commented 8 years ago

Not quite sure I get you. Are you saying you don't know how to use Cordova to send your code to the device? If so, that's covered in the docs. Typically just:

cordova run android

or

cordova run --device ios

ramrattle commented 8 years ago

ok..ill check the docs..thanks for your help and time