I've seen it can be done in camera configuration manager but not sure where to find that file???
<activity android:name="MainActivity" android:configChanges="keyboardHidden|orientation" android:screenOrientation="portrait"/>
And now the mainactivity is locked on portrait, but when running zxing scanner from inside activity the screen rotates during scan??