Software Archive
Read-only legacy content
17061 討論

QR Scanner capture orientation

Abel_G_
初學者
642 檢視

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 積分
3 回應
Swati_S_Intel1
642 檢視

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

 

Abel_G_
初學者
642 檢視

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 :)

Swati_S_Intel1
642 檢視

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

Thanks,

Swati

回覆