Frage

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.

War es hilfreich?

Lösung

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());
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top