Android Programming for Beginners

For what it’s worth …

I too started Android development using Processing, about 12 years ago. My specific area of interest was (still is) audio/music but I needed a relatively easy means of creating a GUI and at this, Processing excels! It was my basic introduction to Java coding and it was easy to get quick results!

Beyond the GUI though I had to delve into contributed libraries (Ketai, Minim etc) but as Processing developed, I found that Ketai/Minim were never maintained to support upgrades etc and similarly with a few other contributed libraries, so eventually I took the plunge and exported my Processing sketches and set them up in Android Studio. The basic lesson learnt was that you SHOULDN’T use contributed libraries. As good as they may be, unless they are maintained in line with Processing developments, they will likely at some point stop working.

Moving to Android Studio was a real game changer. Once I’d figured out that I still had setup() and draw() I could just carry on using them as before. No need to bother with XML layouts etc as you have the full screen still as your canvas and can do what you like with it. The big advantage though was discovering I could make use of the much fuller capabilities of the Android SDK for audio … MediaPlayer, AudioTrack etc. And once you know how to read into the SDK you can find all sort of other useful stuff. I then found that all this can also be done in Processing too so perhaps not quite the game changer I initially thought it might be! The point though is that it expanded my horizons and now I can do both. I still use Processing for sketching ideas but then shift to Android Studio to finish.

The biggest issue though re Processing vs Android Studio is the lag in development of Processing Android Mode to keep pace with the ever/regular/often rule changes that Google introduces … SD Card access permissions… minimum and target SDK requirements if you want to put anything on Google Play. It’s a bit more effort to keep track of SDK target and version numbers but not difficult once you know which files to edit.

If you do export to Android Studio, you will also discover that Processing has hidden from you the onCreate(), onStart(), onResume(), onPause(), onStop() and onDestroy() methods that define an android app lifecycle … and if you are teaching android development then you should know about them.

What else do you want to do beyond displaying cool graphics?
Do you want to be able to play audio?
Do you want to be able to access file storage?
Do you want to learn about the android app lifecycle?

Do your learners just want to code and deploy to just their own device or do they want to publish on Google Play and learn more about Android? If the latter get set up in Android Studio. If the former then use Processing but accept its limitations.

2 Likes