com.paragon.open.dictionary.api
Interface Dictionary.TranslateAsImageListener

Enclosing class:
Dictionary

public static interface Dictionary.TranslateAsImageListener

Callback interface for the translation in image format requests.


Method Summary
 void onComplete(android.graphics.Bitmap image, TranslateMode mode)
          Called when a translation request completes.
 void onError(Error error)
          Called when an Open Dictionary API Service responds to the request with an error.
 void onIPCError(java.lang.String details)
          Called when an error occurs while communicating with the Open Dictionary API Service.
 void onOutOfMemoryError(java.lang.OutOfMemoryError e)
          Called when an OutOfMemoryError occurs during deserialization of the image.
 void onWordNotFound(java.util.ArrayList<java.lang.String> similarWords)
          Called when the specified word is not found.
 

Method Detail

onComplete

void onComplete(android.graphics.Bitmap image,
                TranslateMode mode)
Called when a translation request completes.

Parameters:
image - image with translation
mode - result translate mode. May differ from the requested translate mode

onOutOfMemoryError

void onOutOfMemoryError(java.lang.OutOfMemoryError e)
Called when an OutOfMemoryError occurs during deserialization of the image.

Parameters:
e - OutOfMemoryError

onWordNotFound

void onWordNotFound(java.util.ArrayList<java.lang.String> similarWords)
Called when the specified word is not found.

Parameters:
similarWords - list of similar words

onError

void onError(Error error)
Called when an Open Dictionary API Service responds to the request with an error.

Parameters:
error - any error

onIPCError

void onIPCError(java.lang.String details)
Called when an error occurs while communicating with the Open Dictionary API Service.

Parameters:
details - detailed message