简体   繁体   中英

ActivityNotFoundException while using ZXing

Android 2.3.3

As with most of the people using ZXing (new to using ZXing ), I am getting the ActivityNotFoundException (I guess there is no need to paste my logcat as it's the same with all other people).

I have seen few questions related to ActivityNotFoundException with ZXing . Here is what I have understood so far. Please correct me if I am wrong..

If I have to use ZXing in my app, there are two options :

  1. I can use the Intent and startActivityForResult() , if the user already has the ZXing application installed, and if doesn't, I can redirect him to the playstore to install it first and then use my application.

  2. For my application to work, even if the ZXing application is not installed, I can add ZXing library to my project as a library, copy the code of IntentIntegrator class(from here ) into a seperate class in my application and use IntentIntegrator . Is this the intended purpose of IntentIntegrator ? or Am I getting it completely wrong?

Can someone help me with my doubts?

EDIT::: Seems like the second approach also needs to have the ZXing application installed on the device. Is there a way, that my application can work, without the need of ZXing app installation?

You haven't installed Barcode Scanner. Please use the IntentIntegrator as directed already in the documentation: https://code.google.com/p/zxing/wiki/ScanningViaIntent

It will handle installation for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM