iink SDK on Device

Need help on Android

I want to open new editor but it loads the same editor every time I call this activity. I have attached part of the code please help


image



Hello Ashuto,

Did you start from the Demo sample ?

For me you are using the same part, so it's linked to you stored data even you are using a new editor.

Please refer to the storage documentation for reference:

https://developer.myscript.com/docs/interactive-ink/3.0/android/fundamentals/storage/

Best regards,

Etienne

image


private val editorBinding = YourApplication.DemoModule.editorBinding

val editorData = editorBinding.openEditor(editorView)

 is this part not supposed to create and return new editor?

I have this code in oncreate method. Plz help how can I make sure every time new editor is opened

If you clear the part when you close the editor, when you reopen the editor you will have a empty part.

Really the part object is what you are lookling for.


Hey Let me describe what i want to implement,

I am making a notes app where we have a createnew button which on clicked should take me to a fully new editor,(not to next part) .

I want each notes to  have several part.

for now i have implemented whatever is there in your get tarted repo ,

What changes I need to do nd where can you plz help

I am able to clear the content but what I want is list of notes and when i click on any of them it should open their content and allow editing

Is it possible to schedule a call with your team,  It won't take more than 5 minutes, (also once integrated we will go on purchasing your product)

My recommendation will be to have a look on the Demo, which is more complete, 

especially the nextPart code, that allow with the same editor to switch from part to part and so to have empty content on demand.

Best regards

yeah i am able to create empty part but I want empty editor

also is it possible to create multiple engine


Okay Just help me with one thing,  how can i return a new content repository with a new file path every time i want

Hello,

I'm a bit puzzle,

Did you read the page about the documentation page about storage: https://developer.myscript.com/docs/interactive-ink/3.0/android/fundamentals/storage/ 

You see that you can create package,

 engine.createPackage(newContentPackageFile);

This is the file name, to ensure to create a new one, every time it's a android matter you can generate a uuid randomly to ensure the string is not used, and you can delete the package when closing.

Use the deletePackage() method to remove an existing package from the disk.

let me now if it meet your need,

Best regards,

Etienne


Can I have multiple package on the disk at the same time

Sure, this is the reason to name the file, so you can load different parts.

Login or Signup to post a comment