Text

using Text widgets in application

Hello I want to integrate text widget in my application in android studio. I tried running the samples and they are working fine. Now i want to toast the digital text that appears after user input. I want to save that text somehere. please can anyone help me with this??


Dear mariasaeed01,

thank you for contacting us.

The best way to save the text result is to get it into the onRecognitionEnd function. Here is an example:

@Override
public void onRecognitionEnd()
{
String Result = mEditText.getText().toString();
Log.d(TAG, "result is: " +Result);
}


Let us know if this helps.

Best regards,

Olivier

Dear Olivier,
Thankyou so much for your help. It was really helping. Now can you kindly tell me I want to display the text that is being stored in Result I used multiple ways but it says UNFORTUNETLY THE APPLICATION HAS STOPPED. For Example i simply did this
TextView textElement = null;
textElement.setText(Result);
Please tell me what I am doing wrong what should i do to display it ?

Sorry for the delay,
Could you please let us know which text widget do you use exactly?
Best regards

I'm using SLTW i.e SINGLE LINE TEXT WIDGET

Thanks for that information.
What about this TextView in the Manifest of your application?
Depending on your use case, you will have to check the appropriate android documentation:
http://developer.android.com/reference/android/widget/TextView.html#attr_android:text
Best regards

Login or Signup to post a comment