Interactive Ink

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


Dear See Love,

currently if you refer to the API documentation (https://developer.myscript.com/refguides/interactive-ink/android/1.0/), you will see the getCharacterBoundingBoxes function returns with "Rectangle []". This is the normal behavior, as we may have several bounding boxes (one per character).

Rectangle[] getCharacterBoundingBoxes(Text text, TextSpan[] spans)
Returns the bounding box of each glyph of the specified text if it were displayed at 0,0 using the specified styles.

You then understand the choice we did, and it would be difficult to change it.

Best regards,

Olivier

Dear Olivier,

   I understand the choice. I want get a total result, but a separated result. example the number of '100', I want get a result '100' text. Like mExportResults.sText of the ATK. i can get the recognize result

Dear Olivier,

      I need the API like  the interface  MathWidgetApi's getResultAsText() of ATK. I can get Result. Thanks.

Best regards,

see love


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

Dear See Love,

Please note you can use the export function with the following Mime types: DOCX, GIF, GRAPHML, HTML,JIIX, JPEG, LATEX, MATHML, MUSICXML, PDF, PNG, PPTX, SVG, TEXT.

Nevertheless, if you want to have the box information, you should use the JIIX format.

Best regards,

Olivier

Dear Olivier,

     I don't know where i use editor.waitForIdle(). I  use  the export function the first parameter is the ContentBlock. I don't know the parameter what is it. I need the Mime types is TEXT. 

Do you have the similar example?


Best regards,


see love

   

Dear See love,

you can find more information in the API documentation: https://developer.myscript.com/docs/interactive-ink/1.0/android/fundamentals/import-and-export/#exporting-content

To answer your questions:
I don't know where i use editor.waitForIdle()
>>You can call it after a timer was set, and when asking for export... or when requesting for display...

I  use  the export function the first parameter is the ContentBlock
>>Please see the API documentation. Otherwise, in a math part, you can set the ContentBlock parameter to null (as there is only one content block in a math part), or you could use editor.getRootBlock()

I need the Mime types is TEXT.
>>In the above list, TEXT mime type is available (among all other Mime types).

Best regards,

Olivier

Dear Olivier,

-  I change contentPart = contentPackage.createPart("Math");

- I  set a timer,and i call like  String str = editor.export_(editor.getRootBlock(),MimeType.TEXT); editor.waitForIdle();

FATAL EXCEPTION: main

Process: com.myscript.iink.getstarted, PID: 7066

java.lang.UnsupportedOperationException: Unsupported export format

at com.myscript.iink.Editor.export_(Editor.java:808)

at com.myscript.iink.uireferenceimplementation.InputController$1.run(InputController.java:54)

at android.os.Handler.handleCallback(Handler.java:733)

at android.os.Handler.dispatchMessage(Handler.java:95)

at android.os.Looper.loop(Looper.java:136)

at android.app.ActivityThread.main(ActivityThread.java:5028)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:515)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)

at dalvik.system.NativeStart.main(Native Method)

- Use MATHML Success.


Best regards,


See love



Dear See Love,

this is the normal behavior as the TEXT MimeType is not available for the math content block.

For a given content block, you can get the list of possible MimeTypes using the getSupportedExportMimeTypes function: MimeType[] supportedMimeTypes = editor.getSupportedExportMimeTypes(editor.getRootBlock());

You can find this information in the "Import and export" part of the documentation: https://developer.myscript.com/docs/interactive-ink/1.0/android/fundamentals/import-and-export/

Best regards,

Olivier

Dear Olivier,

    I found a question of the IOS  is Invalid certificate please use a valid certificate. Why? I use Xcode can use simulater successful. But I use Iphone is Error. The Error is:

 Invalid certificate 

please use a valid certificate.

Do you know why. Thanks.

Best regards,

See Love


Dear See Love,

in your ATK dashboard, you have the error message "Mismatch between certificate and application: ...".

It seems to be the reason why the certificate cannot be registered properly. Could you please check again the 'bundleIdentifier' of your project?

You can also refer to the following topic: https://developer-support.myscript.com/support/discussions/topics/16000007816

Best regards,

Olivier

Dear Olivier,

      I create a new application at https://atk.myscript.com/#/user/applicationList, But I can't create ios certificate. I can create Android certificate only ? Why I can't do?


Best regards,

 

See Love

Dear See Love,

currently, you should proceed as follows:
-In your dashboard, open your application
-Click the "Create certificate" blue button

image


-Choose Identifier, Description AND Platform (Android, iOS, Windows):

image


-You will then have a certificate for the platform you just choose (c for iOS, JAVA for Android, CS for Windows)

Best regards,

Olivier

Dear Olivier,

image

The area of red box, I can't Change the platform. Thanks


Best regards,


See Love 

Login or Signup to post a comment