General questions

Android - onRecognitionEnd - getResultAsImage not correctly with BeautifyFontify

Please help me on the below problem

I set RecognitionBeautification as RecognitionBeautification.BeautifyFontify


and on onRecognitionEnd callback, I try to get result as image but the image is not beautiful. Could you show me a property ways to archive my goal please!

public void onRecognitionEnd(final MathWidgetApi widget)
if(!widget.isBusy()) {
image = widget.getResultAsImage();
if (image != null) {

Dear Sir,
Could you please give us more details regarding the difference between the image you expect and the one you get?

Here is a post about a similar request that may help you:

Best regards

I got an image like this gotimage

But i expect this one gotimage

Dear Tran Anh Huy,

Currently, the reason is that the onRecognitionEnd function is usually called several times. What we recommend is that you set a timer (e.g. 500 ms) when the onRecognition function is called ; when it expires, this means this is the latest call of onRecognitionEnd. The stored image should then be the correct one.

Best regards,


Thanks Olivier,
I have worked around with the solution mentioned above. Just wonder why this works perfectly on iOS but not on Android.


Dear Tran Anh Huy,

Just wonder why this works perfectly on iOS but not on Android.
=> You mean the image result is not beautified fontified?

Did you also set the beautify and fontify options to the widget?

Did you try to increase the timer value?

Best regards,


I did set RecognitionBeautification as RecognitionBeautification.BeautifyFontify

With some delay (~2s), I can get the correct image (Image beautified).
But why this doesnt work as iOS (Can get correct image on endrecognition callback without any delay)?
Is it a bug on Android? Will core team support to fix it if I purchase a license?


Dear Tran Anh Huy,

Currently, the internal implementation is different in between iOS and Andoid, and both widgets may behave differently.

A ticket has been submitted for this, but we can not tell when a fix will be done.

Best regards,


Login or Signup to post a comment