What needs to be added to the android manifest file for the zxing barcode scanner?

后端 未结 2 1847
迷失自我
迷失自我 2021-01-28 16:07

I have used Intent to integrate the zxing barcode scanner into my application but i am lost on what needs to be in the manifest. As of right now when i click on the button to la

2条回答
  •  暖寄归人
    2021-01-28 16:29

    The ZXing project provides some code for calling XZing via an Intent on their Wiki:

    http://code.google.com/p/zxing/source/browse/trunk/android-integration/src/com/google/zxing/integration/android/IntentIntegrator.java

    If you're using that code, you don't need to add anything to your manifest file. From your activity you can just call

    IntentIntegrator.initiateScan(this);
    

    That will take care of verifying that ZXing is installed, and prompt the user to install it via the Marketplace if it isn't.

提交回复
热议问题