I using RTR SDK.

but I don't know how to save a captured image when I get the text.

Do I use a buffer to file? below code

If you have a sample, please show me.

public void onRequestLatestFrame( byte[] buffer )
// The service asks to fill the buffer with image data for the latest frame in NV21 format.
// Delegate this task to the camera. When the buffer is filled we will receive
// Camera.PreviewCallback.onPreviewFrame (see below)
camera.addCallbackBuffer( buffer );
data = buffer;