[null, {"document_url": "http://www.androprogrammer.com/2017/05/detect-qr-code-using-google-play.html", "unformatted_src": "https://3.bp.blogspot.com/-oxMz5g0qu04/WRdF6y0s2OI/AAAAAAAABRg/JvX-mm4yB2sgSFFSP8pcltYCDqSxeU-6wCLcB/s640/QrcodeDemo.png", "src": "https://3.bp.blogspot.com/-oxMz5g0qu04/WRdF6y0s2OI/AAAAAAAABRg/JvX-mm4yB2sgSFFSP8pcltYCDqSxeU-6wCLcB/s640/QrcodeDemo.png", "formatted_filename": "QrcodeDemo", "alt_text": "androprogrammer.com", "rendered_width": 640, "rendered_height": 320}, null, null, {"document_url": "http://www.androprogrammer.com/2017/05/detect-qr-code-using-google-play.html", "unformatted_src": "//lh3.googleusercontent.com/--KW9YvJwJpA/AAAAAAAAAAI/AAAAAAAABUA/BCciDnC-cz4/s80-c/photo.jpg", "src": "http://lh3.googleusercontent.com/--KW9YvJwJpA/AAAAAAAAAAI/AAAAAAAABUA/BCciDnC-cz4/s80-c/photo.jpg", "formatted_filename": "photo", "alt_text": "My photo", "rendered_width": 80, "rendered_height": 80}, null, {"document_url": "http://www.androprogrammer.com/2017/05/detect-qr-code-using-google-play.html", "unformatted_src": "http://4.bp.blogspot.com/-DD70LqDV73A/VUiNVAzPDfI/AAAAAAAAA-c/-1UNqSTJtbE/s1600/ic_feed.png", "src": "http://4.bp.blogspot.com/-DD70LqDV73A/VUiNVAzPDfI/AAAAAAAAA-c/-1UNqSTJtbE/s1600/ic_feed.png", "formatted_filename": "ic feed", "alt_text": "Subcribe to our RSS feeds"}, {"document_url": "http://www.androprogrammer.com/2017/05/detect-qr-code-using-google-play.html", "unformatted_src": "http://1.bp.blogspot.com/-OH_WHwYQj2M/VUiNVKLdVhI/AAAAAAAAA-g/cHMOlqZx4Zw/s1600/ic_facebook.png", "src": "http://1.bp.blogspot.com/-OH_WHwYQj2M/VUiNVKLdVhI/AAAAAAAAA-g/cHMOlqZx4Zw/s1600/ic_facebook.png", "formatted_filename": "ic facebook", "alt_text": "Join Us on Facebook"}, {"document_url": "http://www.androprogrammer.com/2017/05/detect-qr-code-using-google-play.html", "unformatted_src": "http://3.bp.blogspot.com/-ph8qgraLnhU/VUiNWpDtO3I/AAAAAAAAA_E/_WJjLDVNa1c/s1600/ic_twitter.png", "src": "http://3.bp.blogspot.com/-ph8qgraLnhU/VUiNWpDtO3I/AAAAAAAAA_E/_WJjLDVNa1c/s1600/ic_twitter.png", "formatted_filename": "ic twitter", "alt_text": "Follow us on Twitter"}, {"document_url": "http://www.androprogrammer.com/2017/05/detect-qr-code-using-google-play.html", "unformatted_src": "http://1.bp.blogspot.com/-4uH9UMWocoQ/VUiNVwGV-TI/AAAAAAAAA-w/5vMHS9LJ3Y0/s1600/ic_gplus.png", "src": "http://1.bp.blogspot.com/-4uH9UMWocoQ/VUiNVwGV-TI/AAAAAAAAA-w/5vMHS9LJ3Y0/s1600/ic_gplus.png", "formatted_filename": "ic gplus", "alt_text": "Add to Circles"}, {"document_url": "http://www.androprogrammer.com/2017/05/detect-qr-code-using-google-play.html", "unformatted_src": "http://2.bp.blogspot.com/-m3SJ41c3c6E/VUiNWMaHICI/AAAAAAAAA-0/5tDQ1CVRdRM/s1600/ic_linkdin.png", "src": "http://2.bp.blogspot.com/-m3SJ41c3c6E/VUiNWMaHICI/AAAAAAAAA-0/5tDQ1CVRdRM/s1600/ic_linkdin.png", "formatted_filename": "ic linkdin", "alt_text": "Connect on Linkdin"}, {"document_url": "http://www.androprogrammer.com/2017/05/detect-qr-code-using-google-play.html", "unformatted_src": "http://3.bp.blogspot.com/-wB5pZTFc5hs/VUiNVKpks0I/AAAAAAAAA-k/pNDRRdFOS_s/s1600/ic_github.png", "src": "http://3.bp.blogspot.com/-wB5pZTFc5hs/VUiNVKpks0I/AAAAAAAAA-k/pNDRRdFOS_s/s1600/ic_github.png", "formatted_filename": "ic github", "alt_text": "Follow us on Github"}, {"document_url": "http://www.androprogrammer.com/2017/05/detect-qr-code-using-google-play.html", "unformatted_src": "//bluehost-cdn.com/media/partner/images/wasim808/300x250/bh-300x250-04-dy.png", "src": "http://bluehost-cdn.com/media/partner/images/wasim808/300x250/bh-300x250-04-dy.png", "formatted_filename": "bh dy"}, null, null, null, null, null, {"document_url": "http://www.androprogrammer.com/2017/05/detect-qr-code-using-google-play.html", "unformatted_src": "http://4.bp.blogspot.com/-piOQqsqrT1Y/VUtfo5EplpI/AAAAAAAAA_s/rMwfuaPQBSk/s1600/ic_googleplay.png", "src": "http://4.bp.blogspot.com/-piOQqsqrT1Y/VUtfo5EplpI/AAAAAAAAA_s/rMwfuaPQBSk/s1600/ic_googleplay.png", "formatted_filename": "ic googleplay"}, null, null]

by  Wasim Memon / in Android , Libraries Demo / with No comments /

In Google play service v7.8 goole developers have provided Api for Barcode & QR Code detection. Now it as been improved with new features like OCR and Object tracking and Face detection. Recently usage of QR code and Barcode scan using smart phones has become so common. So google developers have come up with official solution as Mobile Vision Api. The Mobile vision api supports both 1D and 2D bar codes, in a number of sub formats. like EAN-13, EAN-8, UPC-A, QR Code, Data Matrix etc.

Mobile vision api has following benefits. which makes it best available option for scanning QR and Barcode

- Fast and reliable,
- Works Offline,
- Can read barcode in any orientation (Orientation free) and
- Multiple barcode scan feature at the same time.

In one tutorial we can not cover all scanning options so we will create sample which scan QR code and Data Matrix using device's camera.

As this sample is part of my full project Tutorial. You may find some methods directly used from BaseActivity so please check out full project on Github. Please follow all steps to get expected outcome using Mobile vision api.





As we have taken SurfaceView to display camera output you can add custom controls over camera preview.

To read QR code or Barcode data we have to use BarcodeDetector class and BarcodeDetector.Builder class for configuration. Using Inbuilt camera, library scan QR codes and using native library for parsing it gives data from the QR code. In this tutorial i have set Barcode detector to read QR code and Barcode ISBN code using setBarcodeFormats() method of builder class. you can set different formats as per your requirement.



As google play services available on around 80-90% devices in the market it is easy and safe to use as compare to other options available to perform same task.

That's it from my side. now run the app and see the result. if you have any query or suggestion please let me know in below comment box.




 Action bar Android Android Wear Android WebView Animation Dagger2 Data Caching Database Encryption Gps Libraries Demo Listview Material design Monatize Navigation drawer Preference Review Security Settings 
Offline Dictionary is basically offline dictionary which having more then 35000 english words. You can search any word by typing in any language. its easy to find what you want. so This site uses cookies. By countinue to browse the site you are agreering to our use of cookies. That's Fine