App Inventor crashes during BLE connection with micro:bit when I press a button on the micro:bit

Hello, I have been having an issue with my micro:bit in relation to App Inventor.
I have been using both the micro:bit and Bluetooth BLE extensions in order to get this to work.

I have completely set up the connection to the micro:bit after figuring out how to get it to work, and App Inventor has no problem communicating with the micro:bit except for a slight delay.
However, my problem is that App Inventor cannot handle any inputs from the micro:bit, specifically when I press a button on the micro:bit.
Whenever I try to do this, the app on my phone crashes, which is very frustrating because I cannot get the micro:bit to communicate with App Inventor without it crashing.

Is there any way I can fix this?

Thank you,

  • Mathew

So just to confirm that I understand correctly, you're saying that you set up everything successfully on the App Inventor side using the MicrobitButton component and a corresponding BluetoothLE component and everything there is good up until you press the button on the micro:bit? Normally if a crash would occur, I'd expect it to be earlier in the chain and it's usually due to having changed the HEX file running on the micro:bit. Does this happen with only an empty event handler for when the button is pressed?

You may want to include a screenshot of your blocks and a hex file if you're not using the stock micro:bit image.

It seems to have to do with some sort of incompatibility issue in my phone (Moto Z2, runs Android 8)?
I managed to acquire an older Android tablet (Asus MeMO Pad 7, runs Android 5) and it worked like a charm.

Hmm. There shouldn't be any Android version-specific issues with those components as far as I'm aware. The only thing that immediately comes to mind is whether the location permission request is handled correctly (and I don't see why it shouldn't be). I have a device with Android 10, so if you want to send me the AIA I can try and see if it crashes on that version.

Edit: Also, are you using a v1 micro:bit or a v2 micro:bit?

I do believe that this micro:bit is v1.

Here is a simple button test I created for the micro:bit...
ButtonTester.aia (285.3 KB)