Want to Scan Barcode or QRcode in portrait mode in android

Posted By : Piyush Dubey | 08-Apr-2017


Today I am going to write blog on how to scan Barcode or Qrcode in portrait mode using Zxing library.


Followings steps are required to achieve this task.

1. Now we need to do some trick in the library so import the Zxing library
   from github in your project as a module from here:
   https://github.com/journeyapps/zxing-android-embedded

2. Replace compile project.zxingCore in build.gradle of Zxing module with
       compile 'com.google.zxing:core:3.2.1'

3. Replace  compileSdkVersion project.androidTargetSdk and buildToolsVersion project.androidBuildTools
    with your project compileSDKVersion and buildToolVersion.
 
4. write this at bottom of build.gradle apply plugin: 'com.jfrog.bintray'

5. Remove android:screenOrientation="sensorLandscape" from AndroidManifest file of Zxing library that's it.
   
   You can find the implementation of code here:https://github.com/piyushdubey529/Scanner/

 

THANKS

About Author

Author Image
Piyush Dubey

Piyush is a good learner & innovative. He is passionate about coding and likes to watch cricket & listening music. He has worked on projects like ZipPosRepots, ZipOrdering.

Request for Proposal

Name is required

Comment is required

Sending message..