Using Zxing and Google Goggles with my app

不打扰是莪最后的温柔 提交于 2019-12-23 15:37:29

问题


I have an app, i used this code to integrate zxing

public Button.OnClickListener mScan = new Button.OnClickListener() {
    public void onClick(View v) {
        Intent intent = new Intent("com.google.zxing.client.android.SCAN");
        intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
        startActivityForResult(intent, 0);
        }
    };

public void onActivityResult(int requestCode, int resultCode, Intent intent) {
    if (requestCode == 0) {
        if (resultCode == RESULT_OK) {
           String contents = intent.getStringExtra("SCAN_RESULT");
           String format = intent.getStringExtra("SCAN_RESULT_FORMAT");
           // Handle successful scan
        } else if (resultCode == RESULT_CANCELED) {
            // Handle cancel
        }
    }

I have both zxing scanner as well as google goggles installed in my mobile phone. When i start the app and try to scan, I get the option to choose either the barcode scanner or the goggle app. I thought, hey let's try and use the goggle app for doing other stuff as well like OCR. I select the goggle option but the app does not have the take picture option within it. How do I integrate goggles also with my app? with full functionality?


回答1:


Unfortunately you can't. Goggles will only provide the same core functionality as ZXing. I've spent hours researching the same question.



来源:https://stackoverflow.com/questions/20247842/using-zxing-and-google-goggles-with-my-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!