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
More From Oodles
Ready to innovate? Let's get in touch
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
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.