2. FOCR SDK Features

Init gateway

Contact us for get app_id & secret_key

OCRManager.initGateway(appId, secretKey, new IInitGatewayCallback() {
  @Override
  public void onSuccess() {

  }

  @Override
  public void onFail(@Nullable AppException error) {

  }
});

Register OCR callback

After registration, the SDK will return the corresponding status in the callback

Status
Description

onStart

Called at start OCR

onSuccess

Called when return result

onFail

Called when an error occurs in process

Get Config

  • Get list config used to ocr param

  • When sucess, result is listConfig, it will be called on onSuccess() in callback

  • When fail, it will called on onFail() in callback

Start OCR

  • Used to start OCR

  • When successful start, it will be called on onStart() in callback

  • When have result result will be return on onSuccess in callback.

  • When fails, it will be processed at callback onFail() in callback.

Export OCR data

  • Used to export data OCR to csv or excel file

  • exportType is OCRExportType.CSV or OCRExportType.EXCEL

  • When export success data will be return on onSuccess in callback.

  • When fails, it will be processed at callback onFail() in callback

UI Preview OCR data

Then set OCRData from onSuccess to view

Last updated