Interactive Ink

Answered

Converting Ink into IINKConversionStateDigitalEdit

 Hey guys!!


Quick question, is there any way of converting the iink traces directly into Digital Edit status, without having to pas by IINKConversionStateDigitalPublish in the middle?


Thanks!


Best Answer

Dear Gonxas,

Indeed, if you have a "Text Document" part and want to have Digital Edit, you need to call the convert() twice.

In the case of a "Text" part, you can call convert() once with Digital Edit directly.

Regards,

Maël


Dear Gonxas,

When you call the convert method, the second parameter is the target state (see https://developer.myscript.com/docs/interactive-ink/1.3/android/fundamentals/conversion/#application-to-the-example)

So you don't have to call another method in the middle.

To ensure you pass a valid target state, we recomand you to get the supported conversions state before calling the convert:

 

Editor editor = editorView.getEditor();
        ConversionState[] supportedStates = editor.getSupportedTargetConversionStates(null);
        if (supportedStates.length > 0)
          editor.convert(null, supportedStates[0]);

 Regards,

Maël

Hey Maël.


Yes, that's basically what I'm doing, but from IINKConversionStateHandwriting I don't see IINKConversionStateDigitalEdit as one of the supported conversion states, so I was wondering if there was any other way of doing it, besides converting it to IINKConversionStateDigitalPublish and then immediately converting it to IINKConversionStateDigitalEdit

Answer

Dear Gonxas,

Indeed, if you have a "Text Document" part and want to have Digital Edit, you need to call the convert() twice.

In the case of a "Text" part, you can call convert() once with Digital Edit directly.

Regards,

Maël