The app gets stuck at a screen with the text "Running using the emulator or USB, waiting to get blocks..." upon opening the companion app right away.
Environment:
Android Virtual Device (Pixel 4 x64 system on API31 aka Android 12)
AI2 Companion Version 2.62
Steps to reproduce:
Install AI2 Companion from Google Play Store
Click on the App Icon to open it
The screen pops up and the app is stuck at that stage.
Suspected relevant logs: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent
Background:
We are educators who wish to use App Inventor in our teaching. In order to test our own extensions, we need to run AI 2 Companion within Virtual Devices via Android Studio (buying a device for every single Android version is probably impractical)
Since you're running the companion on a virtual device, it seems like the app thinks you're using an emulator, which is why it shows this text; this should be intended behavior for the emulator.
I do not have any ways to resolve this issue. You'll have to wait until someone else proposes a fix.
I'll open a feature request on the support of testing apps within Android Studio then; it's hard to develop extensions that has decent current-day device support with the default emulator (Android 2.2!)
If you have the aiStarter package installed with the older emulator, you can use it with the newer emulator instance you're running. After starting the emulator in Android Studio, use the Connect > Emulator option to initiate the connection. aiStarter will use the running emulator rather than using the older one it embeds.