iink SDK on Device

Multiple editors with single instance of Engine

Hello Team, 

We have been trying to create 4 blocks that work as separate canvas for recognition of handwriting, but we have not been able to inject the editor in different views at simultaneously. It takes the most recent views and injects editor to it. This happens even on creating multiple instances of the model in home and then injecting them in the separate container views.


It will be helpful if we can get sample code for multiple editor with single engine, as it will be an approach towards resolving our problem.


Thank you 


Hello!


Thank you for your question.

The exercise assessment sample that you can find here uses four different editors with a single Engine object.

It illustrates the case when you want to use several writing areas each one for a specific purpose in your application, but with only one active writing area at a time.

It is thus using multiple editors, one per writing area, as each one has a different purpose.


Best regards,


Gwenaëlle


Hello,

Thank you for quick response. I'd like to know if there could be a sample for iOS in swift. As you have shared the sample of Android. 

We tried to replicate the same from Android example but it did not work for in iOS. It would help if iOS sample can be provided for the same.


Regards,

Vipul

Hello,


Thank you for your update.

We don't have such a sample in Swift but the principle is the same. you have to monitor touch event to detect in which zone the touch event occurs and update active editor if necessary.
In the Android sample, this is done with the checkIfTouchIsInside method of the MainActivity.


Best regards,


Gwenaëlle

Login or Signup to post a comment