blinkinput / blinkinput-android

BlinkOCR SDK for Android
https://microblink.com/ocr
104 stars 29 forks source link

EXTRAS_SHOW_OCR_RESULT does not work #4

Closed aldrinarciga closed 8 years ago

aldrinarciga commented 8 years ago

I tried adding this code : intent.putExtra(BlinkOCRActivity.EXTRAS_SHOW_OCR_RESULT, false);

But when the activity BlinkOCRActivity starts, the preview(green box with text) is still visible.

DoDoENT commented 8 years ago

I've just tested that with simple integration demo and it works. Can you provide a minimal example app in which this extra does not work?

aldrinarciga commented 8 years ago

Here is my method on calling the activity:

protected void onResume() {
        super.onResume();
        Intent intent = new Intent(this, BlinkOCRActivity.class);
        intent.putExtra(BlinkOCRActivity.EXTRAS_LICENSE_KEY, "32UP5GIX-YNI7S3NW-IYEZ63EM-E4HY53J6-X6D4M2W4-2NPVEEBY-V2OBQLJJ-Z7ZI5T4M");

        ScanConfiguration[] confArray = new ScanConfiguration[] {
                new ScanConfiguration(R.string.raw_title, R.string.raw_msg, "Raw", new RawParserSettings())
        };
        intent.putExtra(BlinkOCRActivity.EXTRAS_SCAN_CONFIGURATION, confArray);
        intent.putExtra(BlinkOCRActivity.EXTRAS_SHOW_OCR_RESULT, false);
        startActivityForResult(intent, MY_REQUEST_CODE);

    }

But, as I've said earlier, the preview(green box with text) is still visible.

i1E commented 8 years ago

Hi @aldrinarciga,

You can not disable this preview in the provided BlinkOCRActivity, scan result has to be shown to user in some way, this is the purpose of that activity. With BlinkOCRActivity.EXTRAS_SHOW_OCR_RESULT you can control whether or not the results are shown above scanning window (chars or animated dots). If you want to build your custom scan activity, check BlinkOCRSegment demo app example.

aldrinarciga commented 8 years ago

Oh okay I got it, sorry I got confused. Thanks.