Android App Try 2


The next attempt for a piACC android application is using MIT's App Inventor.
I had used this way back when it was owned by Google.
Due to the fact it is similar to game development with Unreal Engine it is not hard to pick up the flow of things. It is also similar to Scratch which is a linux 2d game builder.

Over the weekend i was able to build the app and redesign it twice. Once using the button images from the console, which really need rebuilt and once with plain buttons which is what I am staying with for now until I can redesign the console icons.
I was able to build the app, install it to my Galaxy mobile and it ran as expected.
The only problem was that it did not work! argh.
Now the problem was not in the coding, I believe that is solid. The problem appears to be in the bluetooth client's connectivity issue.
Reading into it a bit more, it seems to be a common problem, even when testing other supposedly working apps I tried as well.
I believe the problem is the client connection timeout is happening before it can establish a connection and there is no setting for wait time.
I saw a similar issue with python and set a 1 second sleep timer which solved the problem in python. I don't really see a way to do this with the bluetooth client in App Inventor. I will try a loop timer but believe this will be after the fact since you cannot write it into the bluetooth client library itself.
Testing showed that it is pairing and it is attempting to connect, but if I watch it from the pi side, it connects and then disconnects. This is the same thing python was doing prior to adding a wait timer to slow things down. Possibly pi's bluetooth is just not quite fast enough on the connection side.
Using BlueTerm, I was able to connect and send commands, so I know it is possible to get it to work via android, I may just have to pull blueterm and try their code. I believe it was available on Git.
It would be nice to reuse the code from App Inventor but I do not think this is possible since you can only download either the apk or the aia files on the build side.
I still have not tried switching over to the Windows PC side, it may be easier, but I am bound and determined to get this working from a true linux development side.