Currently using ATK for Android, but related to any other toolkits (iInk) except for cloud recognition.
Is there any SDK(?) which allows to make recognition on background, not forcing to use custom view objects? Im using kind of dumb workaround just to hide the view but still using it for recognition. The point is most stroke recognition apps demand their own view, not myscript's fixed view, and recognition on background, without any forced view changes. In case of cloud, it is super intuitive to send strokes and get the result, is there same library for any offline libraries or toolkits? All this real time dot-by-dot algorithms are messing whole concept of recognition, i have my strokes ready already, I just need to recognize them. No views or wasting resources are needed.
You may switch to MyScript Interactive Ink SDK, that will let you send strokes and get results with no UI parts involved. MyScript iink SDK is available from MyScript Developer Portal. Just follow the Get Started instructions to retrieve the libs and example code for Android.
To implement a "no UI" workflow, here are the steps to follow:
All these steps can be achieved with limited modifications from the graphical "Get Started" example.
One additional precision: if you are recognizing text, you should take care of disabling the guides to get a proper recognition, as without "seeing" anything your ink will likely no be written on them.
Thank you for your detailed answer!
I had tried IInk earlier but its sample examples also were running with 'mandatory' editorView, which is initiated by calling findViewByID()
How can I initiate that editorView without view itself?, because it is needed to get editor and other dependencies or is it fine to use just engine to initiate them myself. Also, structure of IInk structure was looking bit confusing due to editorView, engine, renderer, etc. in sample application creating themselves one inside another repeatedly without proper following Model-View-Controller approach. (creating renderer inside view and accessing via view)
As I understand, I can totally avoid editorView, but work only with editor and renderer objects, instantiated using engine only?
You mentioned editor.setViewSize(), what should be input parameters . Is it related to max x/y coordinates I will use? (My strokes' coordinate system goes up to 65535, 65535).
Thank you for answer again
I will change toolkit to IInk again (first attempt had some serious limitations what I already forgot =( and hope it will be fine) ~
Can I ask purpose of having ContentPackage and ContentPart. Ive read the documentation but cannot get the meaning (except for storage), is this generally for keeping different Math formulas some predefined format? Whats its usage for text recognition? And is it mandatory to keep data in a file?
And about ContentPart, what might be use cases for defining several content part? How many content parts is possible to create, when to switch between them? Why "Text Document" is needed while there are "Text", "Math", "Drawing" can exist separately.
And is MetaData for some identification/version comparison purpose only, and may be skipped? From the "Content types" article of documentation I get that Content Part is a central block unit, which is generated/edited during recognition and universally used later for different "output" purposes, and in my case rendering output and file output are unnecessary, so is it also possible to skip it? Oh, also, does ContentPart keep the stroke data as well along with recognition results? Basically for many elements I can see some usage, but cannot get why it is mandatory to have them.
Thank you very much and mt apologies for excessive amount of questions. I just want to understand the logic of the process ~
Please keep in mind that MyScript iink SDK can do a lot more than just processing a batch of strokes and outputing a result. It is very flexible and adapts to many use cases, including interactive ink edition. Some aspects may not matter for a particular use case but will for others.
A content part can be seen as the "work memory" of Interactive Ink SDK. It is where it stores the data it works on, the recognition results it can manipulate, data it off-loads from RAM when there is a need to reduce memory usage, etc. It can be serialized so that you can store all this data and open it at a later point. This may be useful for note taking use cases, for instance. If the data you manipulate is "transient", you do not need to save the part and its parent package, but you must create them for the duration of the session so that iink SDK has a place to work.
Packages group parts together. If you develop a note taking application, each part can correspond to a different "page", while the package corresponds to the "document". It allows iink SDK not to load all pages into the memory at once.
The type of a content part defines the type of its root block. Identifying the type of a block is important, as different types of blocks are processed by different recognition services and technologies. Depending on the type of a block, you will also get different import/export possibilities.
A Text Document part is meant to organize different types of blocks in a vertical layout. It is useful if you want to provide an integrated way to interactively edit text, math and shape in a single page, and comes with matching export capabilities, such as a rich export to Word. If you just want to manipulate basic text, then a "Text" part is all you need.
Metadata allow you to attach custom data to a given content part. It is sometimes useful, like for the "calculator" example in the documentation where it is used to store the computation history. If you do no need metadata, you can safely ignore them.
Stroke data is stored in a part along with recognition results until you convert to typeset text. If you are in a transient mode and just care for the result, you can clear the part via `editor.clear()` once you are done and reuse it to process another input.