Android - Barcode Scanning, Options? Zxing?

后端 未结 6 1986
北恋
北恋 2020-12-14 02:18

I want to create an application for Android that will be able to scan barcodes, get the information contained within the barcode and then be able to use that information in

6条回答
  •  失恋的感觉
    2020-12-14 02:45

    I have it working with this:

    repositories { mavenCentral()
        maven { url "https://raw.github.com/embarkmobile/zxing-android-minimal/mvn-repo/maven-repository/" }
    }
    
    compile 'com.google.zxing:core:3.2.1'
    compile 'com.embarkmobile:zxing-android-minimal:2.0.0@aar'
    compile 'com.embarkmobile:zxing-android-integration:2.0.0@aar'
    

    I recommend using the IntentIntegrator

    IntentIntegrator integrator = new IntentIntegrator(getActivity()); 
    integrator.forSupportFragment(this).initiateScan();
    

    The requestCode comes back with

    IntentIntegrator.REQUEST_CODE
    

    No need to install a separate scanner

提交回复
热议问题