Developers looking for developers

Answered

Export jiix null

After I split the handwriting, the split handwriting cannot export jiix, what happened?

thanks


Best Answer

Dear Customer,


thank you for the 23.pts file. Thanks to it, I was able to find the cause of the behavior.


Currently, when opening it, you have the "2020-04-28 23:01:20.636 10580-10620/com.myscript.iink.getstarted E/MainActivity: Failed to edit block "MainBlock"CONFIGURATION_BUNDLE_NOT_FOUND: error: no such configuration bundle zh_CN" message.


The reason is that the contentPackage of your 23.pts file was written in Chinese, while your project doesn't have the zh_CN language.


Adding the zh_CN language in the assets of your project, it should work fine.


Best regards,


Olivier


can you export JIIX with X Y coordinate? thanks.

OK,thanks very much,i have test it as you say,yeah,this way could get a JIIX after split.

but it‘s not contain X Y coordinate, This is the most important question, thanks

Dear "Develop",


after some work, I was able to build and run your application.


First, as you add back the strokes in batch/incremental mode, we recommend you set the text.guides.enable configuration to false: conf.setBoolean("text.guides.enable", false);


Then, in your "splitPointer" function, your algorithm is not correct, as you do not get any pointerUP, which explains why your JIIX file is empty. The reason is that you never go in the pre > 0 && pointer.p <= 0 condition


I then made your algorithm simpler, as follows:


      int nbPointers = pointers.size();

      for(int i=0;i<nbPointers;i++)
      {
        if(i==0)
          editorView.getEditor().pointerDown((float)pointer.x, (float)pointer.y, -1, (float)pointer.p, PointerType.PEN, 10);
        if (i==nbPointers-1)
          editorView.getEditor().pointerUp((float)pointer.x, (float)pointer.y, -1, (float)pointer.p, PointerType.PEN, 10);
        else
        {
          editorView.getEditor().pointerMove((float)pointer.x, (float)pointer.y, -1, (float)pointer.p, PointerType.PEN, 10);
        }
      }


This way, I could get a JIIX after split.


Best regards,


Olivier

yeah, That's what i mean.

and i using the incrementatl input,  apply the "invert transform" when adding back my coordinates from the JIIX to the editor.

but waitForIdlde have not used, i have try it, it is maybe cause main thread error?

so, this is the demo:https://github.com/woodemi/interactive-ink-examples-android

the test steps is: 

1.run GetStarted

2.click export button,the intelliJ IDEA console print the right result

3.click split button, then wait a moment, until the screen changed

4.click export button again, look at the console, the result have not  X and Y coordinates from the JIIX

thanks very much !


Dear "Develop",


If I understand well, here is the way you proceed:

-You export the first JIIX from note A

-You extract the X and Y coordinates from the JIIX

-You add the coordinates you want to keep to create note B. For such purpose, do you add these in batch-mode: https://developer.myscript.com/docs/interactive-ink/1.3/android/fundamentals/editing/#incremental-input

=>If so, are you using the incrementatl input? https://developer.myscript.com/docs/interactive-ink/1.3/android/fundamentals/editing/#incremental-input

Or the "Series of events": https://developer.myscript.com/docs/interactive-ink/1.3/android/fundamentals/editing/#series-of-events


If the above is correct, please note the following:

-The coordinates you input are in "pixel", while those in the JIIX are in milimeters => Do you apply the "invert transform" when adding back your coordinates from the JIIX to the editor: https://developer.myscript.com/refguides/interactive-ink/android/1.3/

-After the strokes are added, do you call the "waitForIdlde" function before export?


If the above is correct, feel free to provide with a Demo sample that allows to reproduce, it will probably the fastest way to investigate.


Thank you,


Best regards,


Olivier

Can we contact by phone? This matter is very serious for our company,thanks. Phone:+86 171 3834 4850

Dear "Develop",


currently, I am not sure to understand your scenario:

-Do you update the JIIX by yourself, then export?

-Or you do an insert gesture: https://developer.myscript.com/docs/concepts/editing-gestures/#ink-gestures

-Or anything else?


If possible, is it possible to have a video that explains?


Indeed, we are not catching what you are doing.


Best regards,


Olivier

OK,thanks,the step is:
note A -> exprot JIIX  -> split note A by pointer in A's JIIX -> generate note B -> B export JIIX,B‘s JIIX do not contain X Y coordinate.

image


Dear "Develop",


thank you for contacting us.


Currently, the above message doesn't help much. When you say "I split the the handwriting", what are you exactly doing? do you do a "split" gesture? Or you do a scratch-out? Or anything else?


Indeed, we do not see any reason your JIIX is null. Can you please check you do not have an exception raised?


Please provide with more information about what you are doing, as the above message doesn't help at all.


Best regards,


Olivier