Pregunta

I am working on Samsung Mobile SDK and using it's TextRecognition feature for recognition of text written on SpenSurfaceView. I have done this using example provided by Samsung. After conversion I receive data as object SpenObjectBase class.
Now my question is can we convert this SpenObjectBase object as String so that I can show the converted text in EditText ?

Thanks in advance.

¿Fue útil?

Solución

You could try casting it to SpenObjectText and then extracting CharSequence with getText() method:

SpenObjectBase base = //.. your object containing text data
if (base instanceof SpenObjectText) {
    SpenObjectText text = (SpenObjectText) base;
    mEditText.setText(text.getText());
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top