Currently zxing library supports only on landscape mode.For my app i need to use in portrait mode
Use this android library https://github.com/SudarAbisheck/ZXing-Orient
It supports both portrait and landscape orientation.