I am working with such a great library zxing to read QR code. I already got QR code successfully.
Now, My application runs in landscape mode and camera takes the who
I had really terrible experience from this library for the same reason. It seems that even if you succeed showing the camera in portrait mode, it will be stretched (or the output image would be stretched, or the barcode won't be sensed, or some devices had it working fine yet others didn't).
I suspect that Android simply "likes" the camera preview to be in landscape mode, as this is its natural orientation when the user takes pictures.
In the end, what I've done is using landscape mode and rotate everything else, so the user thinks it's portrait mode, but it's not. I think many apps use this technique.
I suggest that if you somehow manage to handle this problem, test it on as many devices as you can.