Software Archive
Read-only legacy content
17061 Discussions

QR Scanner capture orientation

Abel_G_
Beginner
429 Views

There is any way to use the QR scanner in portrait mode instead the landscape mode when the camera opens?, because I don't see any option in the docs: https://software.intel.com/en-us/node/493099

Thanks a lot :)

0 Kudos
3 Replies
Swati_S_Intel1
Employee
429 Views

You can set the orientation using setRotateOrientation method prior to calling barcode.scan. https://software.intel.com/en-us/node/493051

 

0 Kudos
Abel_G_
Beginner
429 Views

Hi Swati, thanks for your help

This is my code but I'm still viewing the scanner in landscape mode :(

document.addEventListener("intel.xdk.device.barcode.scan", function(evt) {

	if (evt.success == true) {
  		temp = evt.codedata;
	  	console.log(temp);
	} else {
		  console.log("fail");
	};

}, false);


$('a').click(function(event) {
	intel.xdk.device.setRotateOrientation("portrait");
	intel.xdk.device.scanBarcode();
});

again, thanks for your help :)

0 Kudos
Swati_S_Intel1
Employee
429 Views

I believe you are trying on Android. I was able to reproduce it. I've filed a bug for this.

Thanks,

Swati

0 Kudos
Reply