[英]Google Goggles via IntentIntegrator Works But No 'Capture' Button
I've done some research (Stack Overflow and on the web) and see that there are some other questions about Google Goggles and the possibility of using it with Android; 我做了一些研究(Stack Overflow和网络上),看到还有一些关于Google Goggles的问题以及在Android上使用它的可能性; via an Intent.
通过意图。 I realize it is not officially supported and that we are all still waiting for Google to open up the API or provide us the functionality to easily use it in our apps.
我发现它没有得到官方支持,我们仍在等待Google打开API或为我们提供在我们的应用程序中轻松使用它的功能。
That said - I would still like an answer / some clarification on the following, if anyone can help? 那就是说 - 如果有人可以提供帮助,我仍然希望得到以下答案/澄清?
Referencing this question: zxing intent "google goggles" doesn't recognize barcodes 引用这个问题: zxing intent“google goggles”无法识别条形码
It is answered that Google Goggles does decode barcodes, which indeed it does... so in my app I am calling to the latest version of the Google Goggles app via the IntentIntegrator: 有人回答说Google Goggles会对条形码进行解码,确实如此...所以在我的应用中,我通过IntentIntegrator调用最新版本的Google Goggles应用:
https://code.google.com/p/zxing/wiki/ScanningViaIntent https://code.google.com/p/zxing/source/browse/trunk/android-integration/src/com/google/zxing/integration/android/IntentIntegrator.java 自由软件 :/ / / / / / / / / / /android/IntentIntegrator.java
This call via the IntentIntegrator successfully opens Google Goggles in scan mode (of sorts), however there is no 'Capture' button displayed on the UI, it is hidden / unavailable ... so it is not possible to take a shot / capture any image, to see if the callback with result to my app works. 通过IntentIntegrator进行的此调用成功地以扫描模式(各种类型)打开Google Goggles,但是UI上没有显示“捕获”按钮,它隐藏/不可用...因此无法拍摄/捕获任何内容图像,以查看带有我的应用程序结果的回调是否有效。
So my thoughts are: 所以我的想法是:
Code sample of how I'm making the call to open Google Goggles below. 以下是我打电话打开Google Goggles的代码示例。 Also another way to do the same thing is included, but commented out for reference.
还包括另一种做同样事情的方法,但注释出来供参考。
// Try and open Google Goggles for scanning
try{
IntentIntegrator integrator = new IntentIntegrator(getSupportActivity());
integrator.initiateScan(IntentIntegrator.TARGET_ALL_KNOWN);
//Intent intent = new Intent("com.google.zxing.client.android.SCAN");
//intent.setPackage("com.google.android.apps.unveil");
//startActivity(intent);
}catch(Exception e){
Log.e(ScanFragment.class.getName(), "onViewCreated > Error creating scan Intent to Google Goggles: " + e.getMessage());
}
//>
Any help on finding out more on this would be greatly appreciated; 任何有关如何了解更多信息的帮助将不胜感激; thanks.
谢谢。
// WildStyle // 狂野的
Yes, I am actually not sure Goggles supports this Intent
anymore. 是的,我实际上不确定Goggles是否支持这个
Intent
。 It is not in the list of apps that will be targeted by default. 它不在默认情况下定位的应用列表中。 So I don't think you are opening Goggles if you are using
IntentIntegrator
; 因此,如果您使用的是
IntentIntegrator
,我认为您不会打开Goggles; you are opening one of the Barcode Scanner apps. 您正在打开其中一个条码扫描器应用程序。 They don't have a capture button, you just bring the barcode into view.
它们没有捕获按钮,您只需将条形码带入视图即可。
If it's really opening Goggles, maybe it was previously set as the default for this Intent
and that is taking precedence. 如果它真的打开Goggles,也许它之前被设置为此
Intent
的默认值,并且优先。 Try clearing application handler associations in Settings. 尝试在“设置”中清除应用程序处
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.