Hey, this is my first post related to MIT App Inventor.
I'm having trouble handling errors when pairing via Bluetooth. I created an app that connects to an ESP32 via Bluetooth, but I ran into an issue:
If I select a device from the list of paired devices, but it's unavailable (turned off or out of range), Android returns an application error and expects it to close (even though the app is still running). I tried adding error handling—redirecting the user to another screen in case of an issue—but the app still crashes.
Does anyone know how to properly catch this error and prevent the app from crashing? Thanks in advance!
This sounds like you get a runtime error.... you can't catch runtime errors...
What is the manufacturer and Android version of your device? What happens on another device?
You might want to provide a screenshot of the error message
Hey, thanks for your response, but my issue is a bit different. If the device is nearby, I have no problem pairing with it. The problem occurs when the device I am paired with is not available (for example, if it has been disconnected from power).