public final class SpenRecognizerManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SPEN_RECOGNIZER |
| Constructor and Description |
|---|
SpenRecognizerManager(Context context)
Creates an handwriting recognizer instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes an SpenRecognizerManager instance.
|
SpenRecognizer |
createRecognizer(SpenRecognizerInfo info)
Create an handwriting recognizer instance with the specified information from the
candidate information list.
You can get the information by calling getInfoList() |
SpenRecognizer |
createRecognizer(SpenRecognizerInfo info,
String key)
Create an handwriting recognizer instance with the specified information from the
candidate list and the specified key.
You can get the information by calling getInfoList() |
SpenRecognizer |
createRecognizer(String className)
Create an SpenRecognizer instance with the specified class name.
If you know the name of the package and class, you can call this method directly without creating a candidate list. |
SpenRecognizer |
createRecognizer(String className,
String key)
Create an SpenRecognizer instance with the specified class name and key.
If you already know the name of the package and class, you can call this method directly without creating a candidate list. |
void |
destroyRecognizer(SpenRecognizer recognizer)
Destroy the currently loaded handwriting recognizer plug-in instance.
|
List<SpenRecognizerInfo> |
getInfoList()
Get the list of available handwriting recognizer plug-ins.
|
String |
getPrivateKeyHint(SpenRecognizerInfo info)
Get a private key hint for the plug-in.
|
public static final String SPEN_RECOGNIZER
public SpenRecognizerManager(Context context)
context - The Context for your application.IllegalArgumentException - Thrown when context is null.close()public List<SpenRecognizerInfo> getInfoList()
public String getPrivateKeyHint(SpenRecognizerInfo info) throws ClassNotFoundException, InstantiationException, IllegalAccessException
info - The SpenRecognizer information object.IllegalArgumentException - Thrown when the information passed is null.ClassNotFoundException - Thrown when the class loader is unable to find the specified class.InstantiationException - Thrown when the constructor is not accessible for instantiation.IllegalAccessException - Thrown when the class methods are not accessible.IllegalStateException - Thrown when the candidate list is not created.IllegalArgumentException - Thrown when info is null.public SpenRecognizer createRecognizer(SpenRecognizerInfo info) throws ClassNotFoundException, SpenCreationFailureException, Exception
getInfoList()info - The handwriting recognizer information object.IllegalArgumentException - Thrown when the information passed is null.ClassNotFoundException - Thrown when the class loader is unable to find the specified class.SpenCreationFailureException - Thrown when the handwriting recognizer instance cannot be created.IllegalStateException - Thrown when the candidate list is not created.Exception - Thrown if the handwriting recognizer engine returns an error.public SpenRecognizer createRecognizer(SpenRecognizerInfo info, String key) throws ClassNotFoundException, SpenCreationFailureException, Exception
getInfoList()info - The handwriting recognizer information object.key - The private key.IllegalArgumentException - Thrown when the information passed is null.ClassNotFoundException - Thrown when the class loader is unable to find the specified class.SpenCreationFailureException - Thrown when the handwriting recognizer instance cannot be created.IllegalStateException - Thrown when the candidate list is not created.Exception - Thrown if the handwriting recognizer engine returns an error.public SpenRecognizer createRecognizer(String className) throws ClassNotFoundException, SpenCreationFailureException, Exception
className - The full class name of the recognition plug-in.IllegalArgumentException - Thrown when the information passed is null.ClassNotFoundException - Thrown when the class loader is unable to find the specified class.SpenCreationFailureException - Thrown when the handwriting recognizer instance cannot be created.Exception - Thrown if the handwriting recognizer engine returns an error.public SpenRecognizer createRecognizer(String className, String key) throws ClassNotFoundException, SpenCreationFailureException, Exception
className - The full class name of the recognition plug-in.key - The private key.IllegalArgumentException - Thrown when className is null.ClassNotFoundException - Thrown when the class loader is unable to find the specified class.SpenCreationFailureException - Thrown when the handwriting recognizer instance cannot be created.Exception - Thrown if the handwriting recognizer engine returns an error.public void destroyRecognizer(SpenRecognizer recognizer)
recognizer - The handwriting recognizer instance.IllegalArgumentException - Thrown when the handwriting recognizer engine is not loaded.public void close()