com.abbyy.mobile.rtr

## Interface IRecognitionService.Callback

- All Known Subinterfaces:
    IDataCaptureService.Callback, IImageCaptureService.Callback, ITextCaptureService.Callback
  Enclosing interface:
    IRecognitionService

      public static interface IRecognitionService.Callback

  A callback interface to interact with the recognition service: input the data and obtain the results. While the service is being stopped, frames continue to be requested and calls to this callback continue to be queued, so this callback can be called after the service has been stopped.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onError(java.lang.Exception error)` Reports an error.
    `void` | `onRequestLatestFrame(byte[] buffer)` Requests the latest video frame.

- - ### Method Detail

    - #### onRequestLatestFrame

          void onRequestLatestFrame(byte[] buffer)

      Requests the latest video frame. The frame should be provided through a call to the `submitRequestedFrame` method.
      Parameters:
        `buffer` - the buffer to be filled with image data for latest frame. Only NV21 format is currently supported.

        Can be passed directly to `Camera.addCallbackBuffer`. When the buffer is filled with data, it should be passed back to the service by calling `submitRequestedFrame`.

    - #### onError

          void onError(java.lang.Exception error)

      Reports an error.
      Parameters:
        `error` - The `Exception` object for the error that has occurred.