Hi Everyone, Last week I tried to implement a barcode scanner using the zxing library. Writing this blog on this topic because I found the tutorials about barcode scanner using zxing is either pretty much older or confusing. Let's start by importing these two libraries in our Android project. compile 'com.journeyapps:zxing-android-embedded:3.0.2@aar' compile 'com.google.zxing:core:3.2.0' Practically , we only use the back camera for scanning the barcode because it has more clarity and auto-focus feature. But , I will also show how to implement the same with the front camera. Create a new layout and add two buttons for opening the barcode scanner with front camera and back camera. activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http...
I blog about Android Development. About the things I encountered while at work. Hope to give it back to the community.