[PAID] MlTBRek: Offline Text and Barcode recognition using ML Kit [$8 or 551]

Hopefully, I'll be able to update extension tomorrow .

1 Like

Awesome

ChangeLog Version 4 :warning: :warning:

  • Extension has been completely re-written so create a backup of imp projects before importing new version

  • Added Chinese, Japanese and Korean language script supported to extension

  • Updated Text Recognition (19.0.1) and Bar Recognition (18.3.1) SDKs

  • Added license key property so no need to upload license to assets now

1 Like

Hi Sunny,
when I pass the file from ASD (e.g. /storage/emulated/0/android/data/appinventor.username.appname/files/file.jpg) to the RecognitionText method, the TextRecognized event never fires and the app waits. Could you please check this?
Thanks

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

Hi Taifun, this is the block that does NOT work ONLY with files directly from ASD (e.g. /storage/emulated/0/android/data/appinventor.username.appname/files/file.jpg)

Your answer leaves me confused
Are you using additionally my pdf extension?
Please elaborate

Taifun

I knew you would mention this particular directory name :-). But in reality, it doesn't matter.
P.S. Yes, I'm using your PDF extensions, and it works perfectly

Pm me the apk link.

Sunny, I sent you the demo aia with a problem

Unfortunately, there is nothing relevant in logcat. So, can't do anything.

The corrected text is:

[mod edit: paid extension in aia]
The error is stable. Did you check the file name that you are passing to ML Kit?

Sorry, what do you mean?

I guess that you are processing the file name in your extension before passing it to the ML Kit API in the RecognizeText method. Maybe the problem is there?

1 Like

No. If input is a content uri then InputImage is prepared using createFromUri method but if input is file path then InputImage is prepared using createFromBitmap path. Bitmap is obtained from BitmapFactory.

1 Like

Does this mean that the problem lies within the ML Kit?
If so, would it be possible to inform the ML Kit developers about this issue?
It's unfortunate that the ML Kit cannot be used when all user files are saved in the ASD.

P.S. I tried passing the content URI of the file in the ASD to the RecognizeText method, but the problem persists

1 Like

Hi @vknow360 ,

I'm encountering two issues while using your extension:

  1. The extension crashes immediately if Google Play Services is not installed, disabled, or unavailable.

  2. A Runtime Error occurs if the "ML TBRek1 Init..." block is not called before using other blocks or if the sequence of using blocks in ML Kit is incorrect.

Could you please consider adding a block to check if Google Play Services is available in the next update?

The issue where the application crashes immediately when Google Play services are unavailable (turned off) has been temporarily resolved by installing the Ml Kit extension by Kumaraswamy. His extension checks Google services and fortunately does not conflict with this extension. However, there is still one problem. I have tested installing the application on an Android 14 device with API 37, and it still experiences immediate crashes even when Google Play services are enabled. I am unsure of the root cause. Has anyone else encountered a similar issue on Android 14?

Ok, I'll add a block to check availability.

That's reasonable.

My phone has Android 14 and never experienced such issue.
Pm me apk or find logs.

1 Like

I have identified that the app crash upon opening on an Android 14 device is caused by something else (although I still haven't been able to figure out what it is). Thank you for your guidance.