Question

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.

Was it helpful?

Solution

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());
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top