iink SDK on Device

Answered

iink sdk interactive with unity

Hi,

   I use 'GetStarted' example of the module   ' interactive-ink-examples-android-master'  to make a AAR. I've imported to the Unity sucessfully and I can use Unity  to lanuch the  Activity of 'GetStarted'. I can use the Activity to draw and  call the method of the convert of the Editor.But I can't found the API from return result. I found  getCharacterBoundingBoxes of  FontMetricsProvider to get a result. but the result is Separate into several parts,which is not my wanted result .I just want the whole result once ,so please tell me how to find the result API?

Best Regards


Best Answer

Dear See Love,


currently, you should export your result in jjix, proceeding as follows:


-first, ensure you have an iink Editor properly initialized, such as in the code samples
-Create a content package: ContentPackage pkg = engine.createPackage(« myfile.iink »)
-Create a Math content part: ContentPart part = pkg.createPart(«Math»)
-Set this part to the editor: Editor.setPart(part)
-Feed the editor with your ink using editor.pointerEvents(eventArray, false), where eventArray is your ink converted into pointer events (pointerDown, pointerMove+, pointerUp) and false means the gestures where deactivated
-wait for the recognition to end: editor.waitForIdle()
-export in JIIX format: editor.export_(MimeType.JIIX)


You can then parse your jiix file: you will find information such as label, bounding box of each term...


Best regards,


Olivier