Android Studio Tutorial How to Scan Barcode or QR Code Using Camera

Assalam o Alaikum Friends in this tutorial i will show you how to scan bar code or QR Code by Camera using Zxing Library in Android Studio.

Zxing and Google Play Services Library:
implementation ‘’
implementation ‘me.dm7.barcodescanner:zxing:1.9’

Generate QR Code:

#qrcode #barcode #arsltech




Xem thêm bài viết khác:

31 thoughts on “Android Studio Tutorial How to Scan Barcode or QR Code Using Camera

  1. Hello bro, how about scan barcode ? You did not show it,

    Also i have the same case if you will like you can assist me on my code +255719260602

  2. I am getting this error bro.

    error: cannot find symbol

    resultTextView = (TextView)findViewById(;


    symbol: variable result_text

    location: class id

  3. hello
    i tried to implement this code and I was willing to show the result in the other activity and I did the needful but still my app crashes don't know why, it would be great if you can help me out.

  4. Thank you sir.
    Sir code to run ho gya pr jab scan QR button pe click kr rha hu to blank page open ho rha hai.. please help me.

  5. I think your approach is very useful, however it might be enhanced in terms of security.

    Don't you think it is better to use a startActivityForResult to get the restrieved Result from scan and handle this in MainActivity instead of using a public variable ?

  6. By clicking on Scan qr button,it is redirecting to next page,but the camera is not opening,can I know why?

  7. Sir.. i need help… After getting the result.. i want to capture image of that barcode .. please help me into it

  8. Do I need to use physical device only ? I am not able to scan because the default camera in emulator is not working. I get blur screen when I open the camera.

  9. bro i follow all the steps as you told but my app couldn't able to open the camera to scan.Can you tell me where i'm wrong.

  10. Nice Tutorial. It would have been great if you added the on activity permissions as well, Anyways its Great, Thank you.

  11. hi , can u plz help me i'm having an issue
    code is running absolutely good but camera is not opening can u tell me why ?

  12. Mashallah. Thanks Brother …this video is very helpful for me. May Allah give you more knowledge, subscribers and views.

  13. Search: How to create QR Code in android studio


    The entire youtube was swallowed by Hindi…

  14. On 7:42 you have made an intent of getApplicationContext().ScanCodeActivity.class it is giving error on my side I don't know why, Even I made the ScanCodeActivity in same package but it is not getting it and ScanCodeActivity is not coming in suggestions, please tell me whats the problem here.

  15. arsl bhai, Cannot add a null child view to a ViewGroup error dikha raha hai.
    jo setContentView(); change kiya humne second activity ke liye uske wajah se shaayad??

Leave a Reply

Your email address will not be published. Required fields are marked *