/** * Launch an AsyncTask to perform an OCR decode for single-shot mode. * * @param data Image data * @param width Image width * @param height Image height */ private void ocrDecode(byte[] data, int width, int height) { beepManager.playBeepSoundAndVibrate(); activity.displayProgressDialog(); // Launch OCR asynchronously, so we get the dialog box displayed immediately new OcrRecognizeAsyncTask(activity, baseApi, data, width, height).execute(); }