Taifun
The same happened to me. Companion works, apk doesn't. Tested on two different Android devices with most recent Android version.
Hi, I will update the extension in the coming days.
Hi, did you manage to update your wonderful extension?
Hello, not yet, I'm slowly clearing all the backlogs I have and with other extensions, it may take a little bit more time.
Version 1.2
- Bug fixes for newer Androids
xyz.kumaraswamy.textrecognition.aix (270.6 KB)
TextRecognition2.aia (272.2 KB)
Hi! I use the extension in Kodular. Unfortunately, the extension causes the app to crash the first 2 times after installation, then everything proceeds normally. I don't know the reason. No problem with App Inventor?
use logcat to find out what's going on
Taifun
from the extension author:
In my case the app is crashing the second time I try to open it after install.
First time it opens OK. Second time it crashes automatically.
Looks like a problem with text-recognition.dex
Logcat:
12-27 10:32:33.617 15112 15112 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.astrogramlabs.tml/io.kodular.mental_magicprediction.Astrogram.Screen_Main}: java.io.FileNotFoundException: /data/user/0/com.astrogramlabs.tml/files/text-recognition.dex: open failed: EACCES (Permission denied)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4164)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: Caused by: java.io.FileNotFoundException: /data/user/0/com.astrogramlabs.tml/files/text-recognition.dex: open failed: EACCES (Permission denied)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at libcore.io.IoBridge.open(IoBridge.java:574)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at java.io.FileOutputStream.(FileOutputStream.java:236)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at java.io.FileOutputStream.(FileOutputStream.java:186)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at xyz.kumaraswamy.textrecognition.AssetManager.unpack(AssetManager.java:25)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at xyz.kumaraswamy.textrecognition.TextRecognition.(TextRecognition.java:46)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at com.google.appinventor.components.runtime.Form.onCreateFinish(SourceFile:483)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at com.google.appinventor.components.runtime.Form.onCreate(SourceFile:403)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:8975)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:8944)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4146)
12-27 10:32:33.617 15112 15112 E AndroidRuntime: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
As indicated above your post, this extension is intended for AppInventor, and no other variants.
Yes I know, but as there is not other extension like this available to use, maybe it´s an easy fix the developer can do so we can use this wonderfull extension.
Thanks anyway
EDIT: previous version of the extension was working perfect. problem is only with this second one
I believe the developers wording indicates that they have no intention or motivation to make it work elsewhere.
Use the previous version if that works for you.
What version of the extension you are using, and what is the Android version? Also as said earlier, you will have hard time getting this extension work in Kodular because of artificial restrictions they impose.
Hi thanks for your response, first I was using the version 1.1 (built 2023-10-12) and it was working excellent also in kodular, but now with the last SDK34 update it makes the app crashes at launch.
Now with the version 1.2 of the extension it opens fine the first time, but second time I open the app after the install it crashes, with the logcat I provided.
I´m on Android 14. Samsung Galaxy S21+.
I will take a look at the issue this evening. By then, can you please test the extension in App Inventor and see if it works on your phone?
Great! Thank you, I tested the aia file of this post and it seems to work fine. It opens the app correct and do the ocr.
I was now testing the same .aia file on the companion in AppInventor, and I get this error:
Writable dex file '/data/user/0/edu.mit.appinventor.aicompanion3/cache/external_comps/xyz.kumaraswamy.textrecognition/assets/text-recognition.dex' is not allowed.
I think it is the same kind of error I get on Kodular about the file "text-recognition.dex", if that helps
Version 1.3
Thank you @Mental_Magic
- Updated code to avoid probable errors.
xyz.kumaraswamy.textrecognition.aix (270.8 KB)
Gracias , muy agradecido. Saludos