MathWidget Solver Deactivation.

To enable/disable the solver I do understand that i need to do the following:


But wanted to know how to set this parameter in the program ?

Dear Seetha,

This can be done in the onCreate function you will find into the file:

protected void onCreate(final Bundle savedInstanceState)

// Set application title
setTitle(getResources().getString(R.string.activity_name) + + com.visionobjects.math.Build.VERSION.RELEASE);

// Configure listeners
mWidget = (MathWidgetApi) findViewById(;

Let us know if this helps.

Best regards,


Dear Olivier,

I tried this. But its not working out - its looking for RecognitionBeautification java file ... ; Once that was created, it was looking for the field/constant BeautifyFontify; Once that was done, again it was looking for adding cast ; ( Add cast to mWidget)

Is there anything else that I'm missing here ?


Dear Seetha,

I just tried again in the configure function, and did not face any difficulty. I could even use the Eclipse completion:

private void configure()
// Equation resource
final String[] resources = new String[]{equation-ak.res, equation-grm-mathwidget.res};

// Prepare resources
final String subfolder = equation;
final String resourcePath = new String(getFilesDir().getPath() + + subfolder);
.copyResourcesFromAssets(getAssets(), subfolder /* from */, resourcePath /* to */, resources /* resource names */);

// Configure math widget
mWidget.configure(this, resources, MyCertificate.getBytes());

Can you check you are using the latest version available on the developer portal?

Best regards,


Dear Olivier,

As you mentioned, I was using the old version. When I tried the new version, it worked fine. This Beautifyfontify worked OK..

I'm actually using this BeautifyFontify for the following reason:

Even before my writing ends, this recognition begins... I wanted a pause here so that I can complete my writing. But for that this beautify fontify doesn't help much.

Can you please assist me on this ?


Dear Seetha,

From the below information, my understanding is that you would like the beautification, fontification and solving only done after a whole equation has been entered?

In that case, in the configure function, you should set the RecognitionBeautification to disabled:

Then, to launch the beautification and solving on demand, you could add a solve button, which then set the RecognitionBeautification to BeautifyFontifyAndSolve, calling mWidget.setBeautificationOption(RecognitionBeautification.BeautifyDisabled)?

Let us know if this answers your question.

Best regards,


Hello Olivier,

Your answer looks that work fine. The only think that not working is the refreshing of widget after


I am trying to do mWidget.solve(); But I cant see any change.

Is there anything else that I’m missing?

Best regards,

Dear Kyriakos,

I am quite surprised by this behavior. Can you confirm the equation was not solved before calling setBeautificationOption?

Indeed, once solved, it is not possible to beautify it again. For this purpose, you should serialize the context before solving, clear it after recognition, and unserialize it.

Best regards,


Hi Olivier,

I am facing the exactly the same issue. Can you elaborate on the steps you said, like where to do serialization and clear the recognition and unserialize. I mean in which event and how. Can you post some code snippet on this if you have any.


Hi Vinay,

Today we don't have such specific code snippet. We may add more example in the future, in the meantime, we invite you to check our documentation and see more details about the MathWidget API:
then choose MathWidget Android
byte[] serialize()
Serialize the current input and recognition result as a byte array.
the corresponding byte array. Only readable using unserialize.

boolean unserialize(byte[] data, boolean allowUndo)
Restore an input and recognition result saved using serialize method.
data - the byte array to unserialize, provided by serialize.
allowUndo - Indicates whether the undo redo stack must be updated with additions.

Best regards

Dear Vinay,
Maybe this post about serialize/unserialize could help you:
Best regards

Login or Signup to post a comment