Text

Where the converted string lives in text in MyDemo

For a group project, we are editing the MyDemo myscript GitHub for android sdk. For weeks, we have been looking for where the text lives once the user converts the handwriting to text. We have no idea where this string is because we need to manipulate and reference it. Can anyone please tell me where that string lives; we are all at our wits' end.


Once the user clicks to convert the handwriting to text, then that's when we want to fetch the string and change it, so once it pops up as text, it can be edited


Hello Pollyruhnke,

You started at the correct point, you should have a look on the SmartGuide class:

https://github.com/MyScript/interactive-ink-examples-android/blob/master/UIReferenceImplementation/src/main/java/com/myscript/iink/uireferenceimplementation/SmartGuideView.java

Here you will see that you have callbacks inform you that new content is avaible:

 public void contentChanged(@NonNull Editor editor, String[] blockIds)

and in the processing you can retrive from the editor the recognition result, editor.export_

Best regards,

Etienne



how in the code can i change the label, though, if this makes sense, and how do i distinct between the screen changing versus the conversation because they are both labeled as text: 

So, I not sure to understand what you mean, and it seems out MyScript boundaries.

So, if you want to change the text:

1) is it changing the candidate of what has been recognized,

2) or delete the converted text and replace it with something completely different.


if 1) look at this page: https://developer.myscript.com/docs/interactive-ink/3.1/android/advanced/text-recognition-candidates/

for 2) need to delete the text block and insert an new text block.


Best regards,

Etienne

What my group intends to do --- sorry I'm not being clear --- is to fetch what has been recognized once it has been converted to text, and then edit it to add a check box before it, if that makes sense. Thank you

So what you are saying is to fetch the label and textbox coordinates? Then, delete the textbox. Then, create a new one with the saved label and corrdinates?

Yes you have the blueprint to do so.

you can either get the recognition, delete ink, insert text at the coordinates.

or convert the ink in text, get the text, delete the text block, insrt a new text block at the coodinates.

Where is the function to delete the text block? I found where to add one inside of PartEditor.KT, but not to remove it

And it crashes when i try to add a block: 

image

 Hello Pollyruhnke,

The aim of this forum is to help our integrator with specific questions and advance usecases.

We are happy to help but we don't have the bandwith to troubleshoot a project step by step.

Please, refer to the documentation, read the forum, and look of exception you received. 

(because you receive an exception that provides you with information to solve your current integration issue)

Wish you all the best for the rest of the project.

Etienne

Login or Signup to post a comment