Problem on Android - Recognition thread cannot be started

I have some strokes from different part of app (from pen). Im converting it into library Strokes and trying to recognize text from it.
I'm getting error Recognition thread cannot be started in method configureEnd of Callback Listener in line pageInterpreter.getRecognitionErrorString();

Code of full method is below. Configuration give me success = false , guess its related to recognitionErrorString.

Additionally I get 2 logs between configureBegin & configureEnd:
1. Creating voEngine
2. Engine status: false

public void processStrokesLoadFinish(final List<Stroke> strokes) {

Log.e("TRANS", strokes.size() + "");
StrokeFactory strokeFactory = new StrokeFactory();
WordFactory worldFactory = new WordFactory(strokeFactory);
final SmartPage smartPage = new SmartPage(worldFactory);
List<SmartStroke> strokesForLibrary = new ArrayList<>();
for (int i = 0; i < strokes.size(); i++) {
strokes.get(i).getYArray(), i, i + 1, SmartStroke.StrokeType.RecognitionStroke, null));
smartPage.setSmartPageRecognitionListener(new ISmartPageRecognitionListener() {
public void recognizerBegin(SmartPage smartPage) {
Log.e("TRANS", "recognizerBegin");

public void recognizerEnd(SmartPage smartPage) {
Log.e("TRANS", "recognizerEnd");

public void recognizerIntermediate(SmartPage smartPage) {
Log.e("TRANS", "recognizerIntermediate");
PageInterpreter pageInterpreter = new PageInterpreter();

final List<String> resources = new ArrayList<String>();
SimpleResourceHelper helper = new SimpleResourceHelper(TranscriptionActivity.this);
List<String> paths = helper.getResourcePaths(resources);
List<String> lex = new ArrayList<>();

pageInterpreter.setPageInterpreterListener(new IPageInterpreterListener() {
public void configureBegin(PageInterpreter pageInterpreter) {
Log.e("TRANS", "configureBegin");

public void configureEnd(PageInterpreter pageInterpreter, boolean success, final String s) {
Log.e("TRANS", "configureEnd " + success);
String a = pageInterpreter.getLocale();
String b = pageInterpreter.getRecognitionErrorString();
String c = pageInterpreter.toString();
Log.e("TRANS", a);
Log.e("TRANS", b);
Log.e("TRANS", c);


// pageInterpreter.setPage(smartPage);
Error error = pageInterpreter.configure("en_US", paths, lex,
MyCertificate.getBytes(), getResources().getDisplayMetrics().densityDpi);
Log.e("TRANS error", error.getErrorMessage());


Thank You for all help and feedback!

Dear Sir,
Thanks for your bug report,
Could you please check the following items?
- Are you able to run the ITC default sample using the sample certificate (com.myscript..+) for android?
- It seems you have disabled several certificates, could you please check you use the enabled one (in this case, you can see 'Disable' button next to the download button on your ATK dashboard)
- For your application, could you please make sure, you have renamed the package string' in the Android manifest?

Please let us know if it helps. If you still face issue regarding your certificate, please send it to devportal.admin(at)myscript.com, so we can analyze it.
Best regards

Thank You for fast replay.
Why should i rename package name in manifest? Seems that i have correct. Copy paste package name from Manifest.xml to MyScript Dashboard.
I did disable certificates from sample and did create separate app for my development.

I did before run sample but doesn't suite me since it does have only sample with widget. I didn't found sample with PageIntepreter for already existing strikes /data.

Best regards,

Dear Sir,

I was just checking basics. If you were able to run the default sample, we should see on your ATK Dashboard 1/40 license consumed except if you disabled Internet on your device for this test. Could you please enable Internet connection and try again, so we will confirm your ATK account does not face any issue?

Could you please also download again the certificate from your ATK account (to make sure you use the enabled one) in your application?

Regarding your use case, in order to analyze it faster, could you please provide us with more details about your project? For instance, when do you call the 'processStrokesLoadFinish' method? A file of your converted strokes may help as well.

Thanks for your patience.
Best regards

Thank You for help.
Problem still exist.
I did enable again sample Certificate and run it. As You see it works properly.

Unfortunately there is no guide how to use library for an existing project so i just have to assume error is somewhere there.
processStrokeLoadFinish is called in async task when Task finish loading Strokes from DB.

Is there any way to debug why thread wont start = PageInterpreter wont start.

Thank You for all help.

We have done some tests on our side and we were able to address this use case successfully. What happen on your side may be due to a wrong order of operations.
Could you please try to call the 'processStrokesLoadFinish' method after 'configure' methods including configurePageInterpreterForRecognition() and private void configureEmptySmartPage()?

In case it could help, please find below a fast way to do such tests, we modified 'loadITF' and 'DeletePage' methods of the default sample:

public void loadITF()
{  //load Welcome itf file

  String path = Environment.getExternalStorageDirectory().getPath() + "/" + "itfDir";
  String chosenFile = path + "/" +"welcome.itf";
  mPageInterpreters[mSelectedPageInterpreterIndex].getPage().loadITF(chosenFile, false);

public void deletePage()
  List<SmartStroke> strokes = mPageInterpreters[mSelectedPageInterpreterIndex].getPage().getStrokes();

Run the default sample, everything is configured properly, choose 'loadITF' option then choose 'clean' option.
This way, we were able to getStrokes from the itf file loaded and to add these strokes (after a clear).

Please let us know if it helps.
Best regards


I cant install myscript on my android phone.
I downloded the android app, but it hasnt any setup file

Dear Ali Alex,

thank you for your question.

Which application are you referring to? Indeed, if using the ATK, with the Android studio, you should be able to build and run the application you developped.

Best regards,


Login or Signup to post a comment