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?
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.
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
Hi @vknow360 ,
I'm encountering two issues while using your extension:
-
The extension crashes immediately if Google Play Services is not installed, disabled, or unavailable.
-
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.
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.
hi @vknow360
The issue with the app closing stems from two extensions in the custom webview: DownloadHelper and BrowserPromptHelper. The app includes ML Kit.
Specifically, adding certain blocks in DownloadHelper causes the app to close immediately upon opening.
Moreover, including BrowserPromptHelper and DownloadHelper (without configuring any blocks) leads to an app package error, preventing installation.
This occurs on Android 14 devices. I previously encountered this on my Android 13 version.
Would you be able to check these two extensions?
Did you check beta version (13) ?
That's awesome. The issue has been resolved in this beta version 13