[英]ActivityNotFoundException while using ZXing
Android 2.3.3 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). 与大多数使用人的
ZXing
(新使用ZXing
),我收到ActivityNotFoundException
(我想没有必要贴我的logcat的,因为它是与所有其他人是一样的)。
I have seen few questions related to ActivityNotFoundException
with ZXing
. 我很少看到有关
ZXing
ActivityNotFoundException
问题。 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 : 如果必须在应用程序中使用
ZXing
,则有两种选择:
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. 如果用户已经安装了
ZXing
应用程序,则可以使用Intent
和startActivityForResult()
;如果没有,我可以将其重定向到Playstore进行安装,然后再使用我的应用程序。
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
. 为了使我的应用程序正常工作,即使未安装
ZXing
应用程序,我也可以将ZXing
库作为库添加到我的项目中,将IntentIntegrator
类的代码(从此处 )复制到应用程序中的单独类中,然后使用IntentIntegrator
。 Is this the intended purpose of IntentIntegrator
? 这是
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. 编辑:::似乎第二种方法也需要在设备上安装
ZXing
应用程序。 Is there a way, that my application can work, without the need of ZXing
app installation? 有没有一种方法可以让我的应用程序运行而无需安装
ZXing
应用程序?
You haven't installed Barcode Scanner. 您尚未安装条形码扫描仪。 Please use the
IntentIntegrator
as directed already in the documentation: https://code.google.com/p/zxing/wiki/ScanningViaIntent 请按照
IntentIntegrator
中的指示使用IntentIntegrator
: https : //code.google.com/p/zxing/wiki/ScanningViaIntent
It will handle installation for you. 它将为您处理安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.