Shruti Nair
Shruti Nair

Reputation: 2034

Phonegap barcodescanner build

I have used the zxing plugin to create a qrcode scanner It works on simulator.But now i dont know hoe to create a build for the same.i have included the following lines in my config.xml file

<plugins name="BarcodeScanner" value="com.phonegap.plugins.barcodescanner.BarcodeScanner"/>

do i need to create plugin.xml also

Upvotes: 0

Views: 685

Answers (2)

chwagssd
chwagssd

Reputation: 181

You are creating this app I see by setting up the development environment yourself, and building/signing using your computer.

I had success very quickly using http://build.phonegap.com - don't write it off too quickly! It has that plugin (barcode) and all I have to do is in the root of my project create a config.xml with:

<!-- phonegap build config.xml syntax -->
<?xml version="1.0" encoding="UTF-8"?>
  <widget xmlns     = "http://www.w3.org/ns/widgets"
           xmlns:gap = "http://phonegap.com/ns/1.0"
           id        = "com.phonegap.xxx-xxx"
           version   = "3.0.1">
   <name>Web Remote</name>

<description>
    WebRemote Application
</description>
<!-- more info here-->
<gap:plugin name="BarcodeScanner" /> <!-- use latest release by default -->

</widget>

See the <gap:plugin name="BarcodeScanner" />?

That is all I have to do in phonegab build to tell it to compile my app with the BarcodeScanner plugin. I tried it, and it works! It is a beauty. No, this isn't how you woul do it in a native compilation, since you are building it yourself make sure you have ' in your head because your app needs to be able to talk to the native plugin (https://github.com/phonegap/phonegap-plugins/blob/master/iPhone/BarcodeScanner/barcodescanner.js if using iOS).

By the way - you didn't mention which platform you are building for (iOS, etc) so I just assumed iOS.

Upvotes: 0

Yuki
Yuki

Reputation: 740

phonegap build does not support plugins on "as you wish basis". there's only one plugin supported.

so you can't use phonegap build with plugins.

Upvotes: 1

Related Questions