Comments (17)
This seems to be a plugman issue(s):
- In current version the plugin dir need to be named "com.phonegap.plugins.barcodescanner".
- You need to manually add an empty plugins tag in "platforms\android\res\xml\config.xml" (just add
<plugins></plugins>
above</widget>
).
There are also multiple "config.xml" files and the one in "www" folder is not copied to "platforms\android\res\xml". Which is another issue...
from barcodescanner.
I confirm this issue too...
from barcodescanner.
I have this issue using Cordova-cli:
$ cordova plugin add https://github.com/wildabeast/BarcodeScanner.git
[Error: grafting xml at selector "plugins" from "Project/platforms/android/res/xml/config.xml" during config install went bad :(]
from barcodescanner.
@jonathannaguin For now you should use cordova 2.9. There seem to be a bit of a chaos in the documentation at the moment.
from barcodescanner.
I think that this response cover this issue...
from barcodescanner.
@jonathannaguin with your comments in the issue Issue #32 linked-to above I could successfully compile a project with the cordova lib 3.0.0 using the phonegap npm tool instead of cordova.
Yet, the BarcodeDemo from https://github.com/wildabeast/BarcodeDemo still won't work out of the box. There is simply no reaction when trying to scan anything.
With your suggested changes to plugin.xml including the barcodescanner.js is copied to the apk file but I didn't understand any of what the documentation said about clobbing and merging. And I have no idea how to check that there is actually something available at plugins.barcodeScanner.scan.
Any help is greatly appreciated.
from barcodescanner.
@Eccenux - you suggest to use cordova 2.9 - that indeed helped.
It took me forever because a few people have forked the orginal repo from wildabeast - which is outdated but still linked to by the plugin docu.
However, using your fork with cordova 2.9.4 and including jonathannaguin comment #32 (comment)
I can compile and scan.
I did not manage with cordova 3.0.0.
I am only starting with phonegap development but this was a really disheartening experience...
from barcodescanner.
@dschien There are some major changes in Cordova at the moment. You can use PhoneGap Build if you want to avoid some problems.
At the bottom of this page you will find instructions that worked for me today on Cordova 3.0: https://github.com/Eccenux/BarcodeScanner/tree/master/src/android/
Note that at the moment you need to clone my repo in step two (original is not updated yet).
For a test app you can use (it's Polish, but with mostly English comments): https://github.com/Eccenux/PP-tracker/tree/master/app
Note that you will have to change app name in config.xml (remove space) and in index.html change phonegap.js to cordova.js.
from barcodescanner.
@dschien I forgot to mention some changes I made to barcodescanner.js. I updated the other issue with this. Basically clobbers
indicates that the module.exports
is inserted into the window object under the target specified. It is because of this why the plugin is under plugins.barcodeScanner
.
from barcodescanner.
@Eccenux Your comment helped me get it working for android using Cordova/Phonegap 3.0 (This jump to the newest version is a mess; don't even get me started on the documentation.) However the grafting issue I am still seeing with iOS. I tried to follow the same instructions you had for android with the exception of the platform parameters that the plugman command uses but it didn't work. You wouldn't by any chance know how to get it working on iOS? Or perhaps I did something wrong.
Thanks for your help!
from barcodescanner.
@aruballo Unfortunately I cannot compile on Mac so cannot really check how it works, but Jonathan made some changes in iOS code for 3.0. Others reported that this version of CDVBarcodeScanner works fine on 3.0:
https://github.com/jonathannaguin/BarcodeScanner/blob/master/src/ios/CDVBarcodeScanner.mm
BTW. Docs seem to be fixed now in "edge" version, at least for Android.
from barcodescanner.
@Eccenux Thanks! I got the plugin installed now. However I am having another issue now..
@jonathannaguin Hello Jonathan. I followed your instructions here:
http://stackoverflow.com/questions/18142247/phonegap-3-0-0-barcodescanner-plugin
However, now I am having the following issue when I call the scan:
2013-08-09 17:58:57.416 PUIClient[3160:907] CDVPlugin class CDVBarcodeScanner (pluginName: BarcodeScanner) does not exist.
2013-08-09 17:58:57.419 PUIClient[3160:907] ERROR: Plugin 'BarcodeScanner' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
However I can see that the plugin is defined in the config xml and in the cordova_plugins.js. On top of all that the relevant files do exist in the classes folder.
I am calling the scan like this:
plugins.barcodeScanner.scan(
...
relevant code here
..
);
Im not completely experienced with the mac programming environment. In the android project I had to create a script tag to call the barcodescanner.js file but for the mac I dont currently have that tag, although it has not made a difference whether I called it or not.
Anyways I am getting carried away. If you can help, or see what I am doing wrong let me know and that'd be great. Thanks guys!
from barcodescanner.
Thanks for all the work!
Will there be an installation routine like "cordova plugin add http://xyz..." to install the plugin correctly?
That would be a huge help for people like me who don´t really see through all the repositories with barcodeScanner plugin in different versions ..
jonas
from barcodescanner.
I rebuilt the application three times and for some reason now the camera comes up for the scan. I think my problem was related with a warning my project was giving me:
"Validate project Settings
Update to Recommended Settings"
Before, I was clicking this warning and letting it resolve the problem but now I am ignoring it and the camera is now coming up when I call scan.
Scanning itself isn't working however..it just doesn't detect any barcodes, which are the same barcodes my Android version is detecting with the same plugin.
If I find anything I'll let you guys know.
from barcodescanner.
This saved my day (on Mac OSX 10.8.4, phonegap 3.0.0-0.14.3)
phonegap local plugin add https://github.com/jonathannaguin/BarcodeScanner.git
from barcodescanner.
same here, thanks @emaV
from barcodescanner.
Should be fixed now with the latest merged contributions.
from barcodescanner.
Related Issues (20)
- Frame the camera view? HOT 1
- App crash HOT 1
- Interface is too ugly, can you change HOT 3
- QR code scanning is very slow on iOS
- PDF417 ios
- Scanning only first barcode part
- success-function returns nothing
- android,The image is distorted in the scan area HOT 1
- build fail
- .
- How to change UIColors
- CAMERA_USAGE_DESCRIPTION not added to Info.plist
- NSCameraUsageDescription... localized strings
- Trying to add a back button in android. HOT 1
- Disable flashlight at volume-buttons
- After the last update I get a "Access violation"-Error when starting the Scanner on W10/W10(m)
- Modifying cordova bar code scanner plugin interface in sap ui5 for andriod
- What is the minimum version of Android to use this plugin?
- German text encoding issue while scanning qr code HOT 1
- Archive repo and move ownership to the phonegap one HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from barcodescanner.