Is there any tutorial for android zxing library with snippets

I'm looking for some kind of tutorial or example on how to use the Zxing library in an android fragment.

UPDATE:

With IntentIntegratorSupportV4, can I only use a scanner if it is installed on the device or in my own application? Because I want to use a QR scanner in my application, which has two tabs. There must be this scanner in the fist. How can I handle this?

+6
source share
2 answers

This sample project demonstrates the use of IntentIntegrator , and you will find a compiled JAR containing this class in the libs/ project directory.

There are only two steps:

  • Call (new IntentIntegrator(this)).initiateScan(); to open the scanner.

  • onActivityResult() and use IntentIntegrator to help parse the results:

     public void onActivityResult(int request, int result, Intent i) { IntentResult scan=IntentIntegrator.parseActivityResult(request, result, i); if (scan!=null) { format.setText(scan.getFormatName()); contents.setText(scan.getContents()); } } 
+5
source

Here is a tutorial on integrating it into your own application. Although not recommended

http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/

+1
source

Source: https://habr.com/ru/post/927106/


All Articles