Interactive Ink

Answered

Save/ Upload to remote storage and Download/Re-Render content into canvas.

Hi,

I was able to dump my entire scribbles to a JIIX file. But I couldn't find any way to read from it again.

Any help would be helpful

Regards
Sourav


Best Answer

Dear Sourav,


currently, the question is rather what do you want to achieve? A copy/paste, or save a package and restore it later?


Indeed, if you want to copy paste, you should use the corresponding functions:

-Copy: https://developer.myscript.com/refguides/interactive-ink/android/1.2/com/myscript/iink/Editor.html#copy-com.myscript.iink.ContentBlock-

-Paste: https://developer.myscript.com/refguides/interactive-ink/android/1.2/com/myscript/iink/Editor.html#paste-float-float-


And to save and open later a Content package:

-save: https://developer.myscript.com/refguides/interactive-ink/android/1.2/com/myscript/iink/ContentPackage.html#saveAs-java.io.File-

-Open: https://developer.myscript.com/refguides/interactive-ink/android/1.2/com/myscript/iink/Engine.html#openPackage-java.io.File-


If this doesn't match your needs, please explain what you exactly want to achieve, so that we may think of another solution.


Best regards,


Olivier


Dear Prem,


thank you for the update.


Currently, in order to store your strokes in database, you can refer to the editor.model.strokeGroups property: https://myscript.github.io/MyScriptJS/docs/typedef/index.html#static-typedef-Model


To import these later, you can use the editor.eastereggs.importStrokeGroups fucntion: https://myscript.github.io/MyScriptJS/docs/function/index.html#static-function-importStrokeGroups


Let us know if this helps.


Best regards,


Olivier

Thanks Olivier. We will try that. Cheers.