Akirayjin
Akirayjin

Reputation: 697

Zxing Barcode Scanner PhoneGap Plugin iOS landscape mode

I have implement Zxing Barcode Scanner in ipad using PhoneGap 1.7.0 and Zxing Barcode Scanner from https://github.com/phonegap/phonegap-plugins/tree/master/iOS/BarcodeScanner. But the orientation is portrait only. I want to change it to landscape by modify this code

if ([previewLayer isOrientationSupported]) {
    [previewLayer setOrientation:AVCaptureVideoOrientationPortrait];
}

and this code too

if (interfaceOrientation == UIInterfaceOrientationPortrait) return YES;

in CDVBarcodeScanner.mm and change the value of Portrait to LandscapeRight. My problem is video not full screen, there has black portion in right. Also when scan barcode only success when portrait not landscape even in landscape mode.

Is there any solution to make landscape mode perfect?

Upvotes: 1

Views: 3579

Answers (1)

Samuel Adam
Samuel Adam

Reputation: 1337

Delete this

if (result.empty() && hints.getTryHarder() && image->isRotateSupported()) {}

on zxing-all-in-one.cpp file

Upvotes: 4

Related Questions