I would like to second Chang’s compliment. Soon I think people will realize how easy it is to program an Android phone, especially those coming from a Arduino background like myself. Thanks!
I was recently going through the examples on the book when I got stuck at the Ketai part, like Chang above. I installed the Ketai library (manually), but I believe processing is still trying to target Android 2.3.3 (API 10). I installed Android 4.0.3 (API 15) from the SDK manager, but am getting an error when I try to build/run the program. It says “Error from inside the Android tools, check the console.” When I try to run the programs not using the Ketai library, it still works. Just as a background, I am using an HTC EVO 3d with Android 4.0.3, Windows 7 (64 bit), Processing 2.08a (64 bit), JDK 1.7 Rev 7 (64 bit), Android Tools 20.0.3. Would you be willing to provide the versions of everything you were using for reproducibility?
Do you have any suggestions or specific instructions on how to make this work? I looked in the processing forums and someone said that the only way they were able to change the target API was by rebuilding the Processing IDE itself. I’m a little uneasy doing this because I’m sure that I’ll create more problems if I go down this road.
I would be happy to correspond and troubleshoot this with you too, if you are willing.
9/8/2012 (2 pm CT)
Update 9/9/2012 (2 pm CT): I noticed that the Ketai library was not available from the Processing library repository.
Update 9/9/2012 (9 pm CT): Problem solved. After much digression with Java versions, environment variables, the Android SDK (which should be in a location that does not need superuser/admin access permission, by the way), etc., I finally figured it out. I exported the project to Eclipse (which I was very hesitant to do because of how intimidating the Processing for Android wiki had made that sound) and it was able to tell me right away what was wrong: I had spelled “background” wrong. I entered in the code by hand from the book, so I made the mistake. When building in Processing it kept telling me the problem was in Android tools, but I did/do not know of any way to look at the specific errors created when using Processing. Do you know, by chance? It would be great to not export every sketch to Eclipse when I have a problem. On the other hand, I learned how to run Processing sketches in Eclipse - which was not that bad considering that I’ve only used Eclipse a couple of times before to run “Hello Android” type programs.