Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Regular Contributor
Saeger
Posts: 83
Registered: ‎04-29-2011
My Device: 9300 Curve
My Carrier: TIM
Accepted Solution

About ZXing on OS 6.0

Hello there guys,

 

I noticed that there's a zxing library on OS 6, packages com.google.zxing.*

I would like to know if it's implemented the javascript plugin or i need to do it by myself like using phonegap or something like that ?

Or if it's implemented the javascript caller for the zxing, where do i found the documentation ?

Márcio Saeger - Software Engineer, Softwell Solutions
Please use plain text.
BlackBerry Development Advisor (Retired)
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: About ZXing on OS 6.0

[ Edited ]

Hi Márcio,

 

There's an implementation on this in the community APIs repo - https://github.com/blackberry/WebWorks-Community-APIs/tree/master/Smartphone/Barcode



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.
Regular Contributor
Saeger
Posts: 83
Registered: ‎04-29-2011
My Device: 9300 Curve
My Carrier: TIM

Re: About ZXing on OS 6.0

[ Edited ]

Hello jeff,

Thanks for helping me.
I'm still little confusing here. See:

I copied the content of webworks to
E:\Research In Motion\BlackBerry WebWorks SDK 2.2.0.15\ext\webworks.media.barcode\
And put the <feature> tag in my config.xml to include it into my project.
I created the index.html with the content provided in the sample. when i run the bbwp, i get this error:



E:\Research In Motion\BlackBerry WebWorks SDK 2.2.0.15>bbwp C:\Desenvolvimento\B
lackberry\bb_workspace_webworks\BlackBerryTestes\build\BlackBerryTestes.zip /o C:\Desenvolvimento\Blackberry\bb_workspace_webworks\BlackBerryTestes\build
[INFO] Parsing command line options
[INFO] Parsing bbwp.properties
[INFO] Validating application archive
[INFO] Parsing config.xml
[INFO] Populating application source
[WARNING] Extension found in E:\Research In Motion\BlackBerry WebWorks SDK 2.2.0.15\ext\webworks.media.barcode\library.xml does not have id defined.
[WARNING] <platform>, <target>, or <configuration> tag missing. Extension found in E:\Research In Motion\BlackBerry WebWorks SDK 2.2.0.15\ext\webworks.media.barcode\library.xml will be ignored
[ERROR] Feature cannot be found in any extension(webworks.media.barcode)

E:\Research In Motion\BlackBerry WebWorks SDK 2.2.0.15>

 





Summay: i'm trying to run a sample code using it but i'm little lost here.

 

Content of E:\Research In Motion\BlackBerry WebWorks SDK 2.2.0.15\ext\webworks.media.barcode\library.xml :

 

<?xml version="1.0" encoding="utf-8"?>
<library>
  <extension>
    <entryClass>webworks.media.barcode.BarcodeExtension</entryClass>
  </extension>
  <features>
	<feature id="webworks.media.barcode" version="1.0.0.0"/>
  </features>
</library>

 

Márcio Saeger - Software Engineer, Softwell Solutions
Please use plain text.
BlackBerry Development Advisor (Retired)
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: About ZXing on OS 6.0

Sorry Marco, the fix is in a pull request that hasn't been merged yet.

 

Please us this library.xml

<?xml version="1.0" encoding="utf-8"?>
<library>
  <extension id="webworks.media.barcode">
    <entryClass>webworks.media.barcode.BarcodeExtension</entryClass>
  </extension>
  <platforms>
    <platform value="JAVA">
      <target version="default" config="JAVA" />
    </platform>
  </platforms>
  <configurations>
    <configuration name="JAVA" version="1.0" >
      <src type="text/java" path="webworks" comment="API implementation in Java" />
    </configuration>
  </configurations>    
  <features>
    <feature id="webworks.media.barcode" version="1.0.0.0"/>
  </features>
</library>

 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.
Regular Contributor
Saeger
Posts: 83
Registered: ‎04-29-2011
My Device: 9300 Curve
My Carrier: TIM

Re: About ZXing on OS 6.0

OHHHHHHHHHHH
OKAY!
=D
I'll try that. I'll answer soon.
Thanks
Márcio Saeger - Software Engineer, Softwell Solutions
Please use plain text.
Regular Contributor
Saeger
Posts: 83
Registered: ‎04-29-2011
My Device: 9300 Curve
My Carrier: TIM

Re: About ZXing on OS 6.0

Now i'm getting:

 

E:\Research In Motion\BlackBerry WebWorks SDK 2.2.0.15>bbwp C:\Desenvolvimento\Blackberry\bb_workspace_webworks\BlackBerryTestes\build\BlackBerryTestes.zip /o C:\Desenvolvimento\Blackberry\bb_workspace_webworks\BlackBerryTestes\build
[INFO]                  Parsing command line options
[INFO]                  Parsing bbwp.properties
[INFO]                  Validating application archive
[INFO]                  Parsing config.xml
[INFO]                  Populating application source
[INFO]                  Compiling BlackBerry WebWorks application
C:\Users\marcio\AppData\Local\Temp\widgetGen.19660792171320429459176.tmp\extension\webworks\media\barcode\BarcodeExtension.java:28: duplicate class: webworks.media.barcode.BarcodeExtension
public class BarcodeExtension implements WidgetExtension {
       ^
C:\Users\marcio\AppData\Local\Temp\widgetGen.19660792171320429459176.tmp\extension\webworks\media\barcode\GenerateBarcodeAction.java:40: duplicate class: webworks.media.barcode.GenerateBarcodeAction
public class GenerateBarcodeAction extends ScriptableFunction {
       ^
C:\Users\marcio\AppData\Local\Temp\widgetGen.19660792171320429459176.tmp\extension\webworks\media\barcode\ErrorObject.java:25: duplicate class: webworks.media.barcode.ErrorObject
public class ErrorObject extends Scriptable {
       ^
C:\Users\marcio\AppData\Local\Temp\widgetGen.19660792171320429459176.tmp\extension\webworks\media\barcode\ScanBarcodeAction.java:31: duplicate class: webworks.media.barcode.ScanBarcodeAction
public class ScanBarcodeAction extends ScriptableFunction {
       ^
C:\Users\marcio\AppData\Local\Temp\widgetGen.19660792171320429459176.tmp\extension\webworks\media\barcode\BarcodeNamespace.java:22: duplicate class: webworks.media.barcode.BarcodeNamespace
public class BarcodeNamespace extends Scriptable {
       ^
C:\Users\marcio\AppData\Local\Temp\widgetGen.19660792171320429459176.tmp\extension\webworks\media\barcode\UI\ScannerScreen.java:33: duplicate class: webworks.media.barcode.UI.ScannerScreen
public class ScannerScreen extends MainScreen {
       ^
6 errors
Error!: Error: java compiler failed: C:\Program Files (x86)\Java\jdk1.6.0_19\bin\javac.exe @C:\Users\marcio\AppData\Local\Temp\rapc_4400 ...
[ERROR]                 RAPC exception occurred

E:\Research In Motion\BlackBerry WebWorks SDK 2.2.0.15>

 Perhaps it's already defined in SDK 2.2.0.15 ??

Márcio Saeger - Software Engineer, Softwell Solutions
Please use plain text.
Regular Contributor
Saeger
Posts: 83
Registered: ‎04-29-2011
My Device: 9300 Curve
My Carrier: TIM

Re: About ZXing on OS 6.0

Sorry,

 

that was my fault.

defined twice: in the project and in the sdk folder.

 

Problem solved!

Márcio Saeger - Software Engineer, Softwell Solutions
Please use plain text.
BlackBerry Development Advisor (Retired)
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: About ZXing on OS 6.0

[ Edited ]

Hi Marco,

 

Happy to hear you got it built

 

***Edited



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.
Regular Contributor
Saeger
Posts: 83
Registered: ‎04-29-2011
My Device: 9300 Curve
My Carrier: TIM

Re: About ZXing on OS 6.0

Thanks again JEFF,

I marked your post as solution, because somebody could have the same problem as me.
Now i'm going to try the sample provided. Thanks alot. Bye.
Márcio Saeger - Software Engineer, Softwell Solutions
Please use plain text.