String IndexOutOfBounds Exception while using extensions in companion app

So why does it still work with Niotron (even on Android 14)?

Did you ask Nitron developers if they made a fix there by raising the SDK target? Maybe they just did it and the fix worked right away...we'd have to ask their developers. Are any of our Power Users developers at Niotron?

@Jewel and I are both moderators there.

Does anyone see any point in Google imposing such idiotic new restrictions? It gets worse and worse every year. :upside_down_face:

I'm asking about programmers, not moderators.

Yes, from version to version more and more restrictions. But I think that this particular change is for greater security.

For whom? Isn't it always the same argument?

Ok, then the answer is no.

probably @Atom_Developer could comment on this?
Taifun

I think he hasn't been there for a long time.

Here's a link to a development version with the new fix I have been working on that should work on both Android 9 and Android 14:

https://www.dropbox.com/scl/fi/oe2pbrmqkesyuyjjw1lm4/MITAI2Companion-273ad1u.apk?rlkey=stysrimdvj98wfzdpxujprz9p&st=vg5kl5y8&dl=0

WOW, this seems to work (at least on Android 13, Pixel 4XL, my first test) ...

Second test on Galaxy Note8 (Android 9): Works as well.

3rd + 4th test on Android 5.x:


I always deleted the Companion folder on the test device beforhand.

1 Like

Ok. Let me see if I can replicate it with an emulator. I don't have a device in my position with Android that old.

Unfortunately I can't test it with Niotron because the minSdkVersion is 23 (Android 6).

5th test on Galaxy A3 (Android 8.0.0): Works fine.

Galaxy S6 (Android 7) is deeply discharged, test follows...

Ok. Here's a newer version that tweaks the extension loading code a bit and adds some additional debug logs. If it still doesn't work on Android 5, please attach a copy of the logcat so I can take a look. This version is 2.73ad2.

[Link removed]

As of 2024-12-20, ai2-test includes companion version 2.73t6 that contains the proposed fix.

2 Likes
Components are not loading when Screen is initialized
Extension not working
Runtime Error with companion update 2.73au and listview component
Companion problem resurfaces
How can I create a slideshow in which images can be updated through some websites or firebase etc instead of reupdating app for replacing image?
App Vanished from 'My Projects'
App Vanished from 'My Projects'
App Vanished from 'My Projects'
Runtime Error: no method named 'CloudConnected' in class java.lang.Boolean
AI companion is not updating the changes done in user extension
Invoke: no method named `GetValue' in class java.lang.Boolean
Al Companion no funciona con algunas Extensiones
Barstool (Status & Navigation Bar Tool)
Dynamic component extension with other extensions
Keyboard - additional methods for the keyboard
Cannot find Clock1?
Companion keeps failing - using BLE Extension
It's about extension Dynamic components
Ongoing AI Companion Issues: Troubleshooting Steps and Observations
How do I append data in the listview with the help of blocks?
AI2 companion does not connect anymore
Runtime Error in different unchanged projects
Teachable machine cannot response after 1/1/2025
Screen completely blank on helper app
MFile extension with an app that already uses the BLE extension
Smbmanager error after adding TaifunFile or TaifunMetadata extensions
Phase • Animations made easy!
Error. Vertical Arrangement Component cannot be found
Companion not displayed any components at version 2.73a
MicroBlocks BLE Extension
Blank screen when I use get metrics
Everything creates an error
What does this: invoke: no method named `HintColor' in class com.google.appinventor.components.runtime.TextBox mean?
BluetoothLE Updates 2024
Problems with AllFilesPermission
Companion problem resurfaces
Extensions not loading correctly or causes errors in Companion v2.73a, 2.73au, 2.73ad2
Companion problem resurfaces

I am no longer associated with Niotron.

2 Likes

Now I didn't get an error and the extensions are where they should be: Computer\Galaxy Note3\Phone\Android\data\edu.mit.appinventor.aicompanion3\files\AppInventor\assets\external_comps
but no Button and Label are displayed and I get this error: