[PAID] DigitalInk: Handwritten text recognizer and Gesture classifier ($10 or INR 701)

DigitalInk Extension

With DigitalInk recognition extension, you can recognize handwritten text and classify gestures on a digital surface (Canvas) in hundreds of languages, as well as classify sketches. The digital ink recognition uses the same technology that powers handwriting recognition in Gboard, Google Translate, and the Quick, Draw! game.

1. Overview

LatestVersion: 1.1
Released: 2024-04-17T18:30:00Z
Last Updated: 2024-05-08T18:30:00Z
Min SDK: 21
Permissions: ACCESS_NETWORK_STATE

Aix Size: 3.2mb

Key Features:

  • Converts handwritten text to sequences of unicode characters
  • Runs on the device in near real time
  • The user's handwriting stays on the device, recognition is performed without any network connection
  • Supports 300+ languages and 25+ writing systems, see the complete list of supported languages
  • Recognizes emojis and basic shapes
  • Keeps on-device storage low by dynamically downloading language packs as needed

2. Blocks

image

3. Documentation

Events

ModelDownloadedEvent raised when model is downloaded successfully
ModelDownloadFailedEvent raised when model downloading fails
errorMsg | text
ModelStateRetrievedEvent raised after retrieving model state
isDownloaded | boolean
GotDeleteModelResultEvent raised after getting 'DeleteModel' method's result. 'errorMsg' is empty if model was deleted successfully.
deleted | boolean
errorMsg | text
RecognizationSuccessfulEvent raised when recognition was successful
text | text
RecognizationFailedEvent raised when recognition failed
errorMsg | text

Methods

RegisterCanvasRegister Canvas component from which handwritten text will be recognized
canvas | component
ClearCanvasClear Canvas drawing. You must use this method instead of Clear method of Canvas component.
DownloadModelDownload specified language model
langTag | text
CheckModelStateChecks whether model for specified language has been downloaded or not
langTag | text
DeleteModelRemove specified model from device.
langTag | text
SetPreContextRecognizer will use this pre-context to identify work breaks and differentiate between ambiguous letter
context | text
InitializeInitialize Recognizer for specified language
langTag | text
RecognizeProcess Canvas text for recognition

4. Example Usage

First register canvas component
image

Check language model state
image

You can list of languages and gestures tag here: Base models  |  ML Kit  |  Google for Developers

If model doesn't exist then we'll download it otherwise if it exists then we are good to go.

Download Model if not exists

each language model is of ~20mb

If model was downloaded successfully then we can initialize Recognizer
image

Now we can start recognition process
image

Draw and Clear canvas when needed

You must use ClearCanvas block of extension

Delete Language Model when not needed further
image

5. Samples and Demos

Gesture Example
arch:above
arch:below
caret:above
caret:below
circle
corner:downleft
scribble
strike
verticalbar
writing

Demo Video

6. Inject Native libs to APK/AAB

You'll get 4 native libs files:

but only arm64-v8a and armeabi-v7a are required to run apk on real devices.
Remaining two are required to run apk on Emulators.
The video given below demonstrates how to add these libs to apk:

A simple app after injection becomes 15mb in size.

How to Sign Apk by @Anke
How to build a big app → APK max. 100 MB or → AAB 150 MB

7. Purchase Extension

Thank you.
Hope it helps!

8 Likes

Demo Video:

2 Likes

ChangeLog Version 1.1

  • Reduced aix size to 3.2mb
    (No additional aix required)
  • Reduced scope of class conflicts