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
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Tutorial for Writing WebWorks Extension for PlayBook

I'm just curious, why would you want to use a local extension to produce a QR code when you can get one in milliseconds using online APIs?

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
Developer
praveen_rajan
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook
My Carrier: Not Specified

Re: Tutorial for Writing WebWorks Extension for PlayBook

May I know about the online APIs you are mentioning here. This extension is a QR Code Scanner and not a QR Code Generator. :smileywink: So far I couldn't find a QR Code Scanner for PlayBook and it is clearly stated in RIM's Enhancement Candidates at https://github.com/blackberry/WebWorks/wiki/Enhancement-Candidates. In addition to all this, this feature should work in offline mode  :smileyhappy: Let me know your thoughts on this.

Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Tutorial for Writing WebWorks Extension for PlayBook

Of course, silly me :smileyhappy:. I just remembered you were working on a QR extension, but failed to re-read the threads.

We're using this to generate codes:

http://code.google.com/apis/chart/image/docs/gallery/qr_codes.html

 

 

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
Developer
praveen_rajan
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook
My Carrier: Not Specified

Re: Tutorial for Writing WebWorks Extension for PlayBook

The one I'm working on is for scanning a data embedded in QR Code. Google offers a QR Code reader library, Zebra Crossing (ZXing). This should work in offline mode also. I was able to implement the functionality. I need to add certain tweaks to it. But I'm currently stuck with that :smileysad:

Please use plain text.
Developer
praveen_rajan
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook
My Carrier: Not Specified

Re: Tutorial for Writing WebWorks Extension for PlayBook

Hi Tim,

I would like to know your feedback on one of my WebWorks extension for PlayBook - Bar Code Scanner (mainly concentrated on QR Code Scanning).  I've been messing around with this extension for sometime and this is as far as I can reach :smileyhappy:

The extension usage is explained below:

 

try {
   blackberry.utils.barcode.scanCode(filePath, codeType, onProgress, onSuccess);
}catch(e) { 
   alert('Barcode Scanner Error - ' + e);
}

//Function executed during processing of image file.
function onProgress(percentage) {
			
   console.log('Processed Image - ' + percentage + '%');
}

//Function executed on completing processing of image.		
function onSuccess(code) {

   alert(code);
}

filePath - Path of the image file to be scanned for Bar code.

codeType - Predefined constants to define the type of barcode to be scanned. (For example: QR_CODE, DATAMATRIX, EAN_8)

 

This extension can be used in conjunction with the camera API extension. Image can be captured using the camera and on successful capture the image path can be given as an input to this extension. Alternatively direct image path can be given as an input.

 

The onProgress function can be used to track the processing of image as it can take time to process larger image files. A simple progress bar can be implemented to display the processing by setting the percentage value returned in the function.

 

Finally, the onSuccess function returns the Bar code.

 

Please let me know your thoughts on this. If this is acceptable it will be my pleasure to help RIM :smileyvery-happy:

 

Please use plain text.
Contributor
ksolo
Posts: 10
Registered: ‎07-22-2011
My Device: 9800
My Carrier: Digicel - Jamaica

Re: Tutorial for Writing WebWorks Extension for PlayBook

hello Praveen 

can you say is your webwork QR scanner will work on a smart phone and not just the paybook?

Please use plain text.
Developer
praveen_rajan
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook
My Carrier: Not Specified

Re: Tutorial for Writing WebWorks Extension for PlayBook

[ Edited ]

I'm not very sure about that since I've not yet tried this on a smartphone. If WebWorks for Smartphone makes use of JavaScript and ActionScript for their extensions then this should definitely workout. The Scanner works by taking an input image file. I couldn't find a way to embed camera in my HTML view. :smileysad: Maybe there are limitations for WebWorks :smileywink:

 

Please use plain text.
Developer
praveen_rajan
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook
My Carrier: Not Specified

Re: Tutorial for Writing WebWorks Extension for PlayBook

Finally I see some movement in barcode API by the RIM for WebWorks

 

The very next day after Tim had informed me about adding the Barcode scanner to https://github.com/tneil/MessingAround/, I could see a new version of Barcode Scanner up in github.   :Tt2:  Good to know that development of API's is having progress. So I guess I should start working on some other WebWork extension :smileywink:

 

Please use plain text.