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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
New Developer
sanjeevtmimt
Posts: 16
Registered: ‎08-13-2012
My Carrier: SE

How to scan and view QRCode ?

:Rockon:

 

yet I did not use it but I have onlu some helpful links which have some api for scanning and viewing the qrcode in cascades development.

 

QrCodeScanner

 

QrCodeView

Please use plain text.
Developer
bskania
Posts: 105
Registered: ‎04-24-2012
My Carrier: relience

Re: How to scan and view QRCode ?

You can use zxing library to read QRcode.

 

Please use plain text.
New Developer
sanjeevtmimt
Posts: 16
Registered: ‎08-13-2012
My Carrier: SE

Re: How to scan and view QRCode ?

[ Edited ]

can you provide a demo application of zxing library which can use to scan QRCode?

Removed personal information to comply withCommunity GuidelinesandTerms and Conditions of Use.

Please use plain text.
BlackBerry Development Advisor
PBernhardt
Posts: 160
Registered: ‎12-16-2008
My Carrier: Bell

Re: How to scan and view QRCode ?

I'm working on a demo using ZXing to scan multiple barcode formats right now, but if all you care about is QRCodes the built in QRCode scanner classes work fine.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt
Please use plain text.
Developer
bskania
Posts: 105
Registered: ‎04-24-2012
My Carrier: relience

Re: How to scan and view QRCode ?

Hello,

This is the example how you can read a QRcode image.


QFile file(path);
qDebug() << path;
QImage qimage = QImage();
if (file.exists()) {
qimage.load(path, "PNG");
} else {
return "";
}
if (!qimage.isNull())
qDebug() << " file found and loaded " << qimage.height()
<< qimage.width();
else
return "";
Ref<LuminanceSource> imageRef(new CameraImageWrapper(qimage));
Ref<Binarizer> binarizer(new GlobalHistogramBinarizer(imageRef));
Ref<BinaryBitmap> _image(new BinaryBitmap(binarizer));
// Tell the decoder to try as hard as possible.
DecodeHints hints(DecodeHints::smileyvery-happy:EFAULT_HINT);
hints.setTryHarder(true);
// Perform the decoding.
QRCodeReader reader;
Ref<Result> _result(reader.decode(_image, hints));
// Output the result.
qDebug() << _result->getText()->getText().c_str() << endl;


For this you need to add library of ZXing.

Thanks.
Please use plain text.
New Member
Jsdfdf
Posts: 1
Registered: ‎01-08-2013
My Carrier: BlackBerry

Re: How to scan and view QRCode ?

Actually, it depends on what platform is the QR Code barcodes are created in. If the QR Code barcodes are created in Java, you can google "Java QR Code barcode reader guide or tutorial", many professional passages like this appear.

Please use plain text.