This is my first time building a component for app inventor. I want to be able to use an OTG gamepad controller in my app, which is eventually going to be used to control a robot through bluetooth. After looking at the tutorials, as well as some source code from the FTC App Inventor version, which has an equivalent component built in, I've got a simple GamePad component that compiles just fine, and shows up with all its properties in AI. But when I incorporate it into a project, the resulting app won't fully build - the text doesn't show up on any labels and buttons, and while no errors appear, the project's code doesn't run either (ex. an "if(true) do X" statement will never do X). Pressing "a" on the gamepad still clicks the selected button, pressing "b" exits the app, etc.
I suspect the issue has to do with the Qualcomm Gamepad.java class I'm using (saved as part of a library, and so far unedited), but I don't know a good way to find out what the exact problem is. I'll post the relevant files here in case anyone has some insight, but my real question - what's the best way to debug your component in AI? Is there a way of creating a visible error message when something fails? Or some other way of figuring out what's going on?
Thank you!