|Rapid Android Development
Author: Daniel Sauter
What could "rapid" Android development be all about?
The answer is partly given by the subtitle "Build Rich, Sensor-Based Applications with Processing".
What Rich, Sensor-Based Applications are might be a mystery but as long as you have heard of the Processing language at least part of what this book is about will be clear.
Processing is a Java-like language that is very popular with artists and creative types. The main reason for this is that a lot of the documentation and publicity is aimed at them. Overall Processing is a perfectly normal and usable object-oriented language with really good graphics and media processing facilities. It runs on the JVM and its free and open source and even if you are decidedly unartistic and definitely non-creative in the same sense it is a language worth knowing about.
One of its most recent features is that it has acquired an Android mode. You might think that this is surprising, but Android is a Java platform - the main difference is that Dalvik is used in place of the JVM. However, the conversion from JVM byte code to Dalvik byte code is fairly straightforward.
This book is basically an introduction to using Processing in its Android mode. It starts off by explaining how to install the Android SDK and Processing. From here we move on to the first "sketch", Processing programs are known as sketches. You can run the program on the Android emulator or a real device.
Chapter 2 moves on to consider the problems and advantages of using touch. At this point the Ketai library - a standard Processing library for mobile phone use - is introduced and from this point on the book is mostly about using it.
Chapter 3 shows how to work with the motion and position sensors. The book tends to be very wordy with long explanations of the ideas behind the scenes of the history. This makes the book easier to read but it takes more time to get to the technical detail.
Part II of the book focuses (pun intended) on using the camera and location devices. It starts off in Chapter 4 with a look at location and how to do things like work out the distance between two locations and so on. Chapter 5 is about the camera and again is mostly about using the Ketai library.
Part II consists of three chapters on networking. Chapter 6 on WiFi, Chapter 7 on Bluetooth and WiFi direct and Chapter 8 on NFC.
Part IV is about data. Chapter 9 working with the file system and Chapter 10 is on using SQLite.
The final part is about 3D graphics. This is about Processing's OpenGL wrapper classes. It goes from simple primitives and lights to textures and using SVG. There are some nice examples such as controlling a mobius band via the gyro orientation sensor.
The final chapter is a collection of topics dealing with publishing your apps and running it within a browser via another of Processing's modes.
Processing is a very easy language to use to create what look like impressive programs - you can achieve a lot with very little code. Most of the examples in this book are very short but they also lack the sort of facilities that any sort of real Android app would need. This is not really the fault of the book as Processing itself doesn't really do buttons and input boxes in Android mode. Yes you might be able to create a clever 3D graphics display and handle some fancy touch input but a conventional user interface to control the app is more difficult. Put another way you can't mix a Processing app with Android Java. As the Android mode of Processing develops this might be possible but at the moment integrating with a conventional Android app isn't possible.
It is important to realize this because you might get carried away with how easy Processing is to use without noticing its key limitation for many apps.
The second problem with the book is that it doesn't really go off the beaten track. Processing is easy to use and so is the Ketai library - it works exactly how you would expect it to. If you are already a programmer then you might find that the book doesn't do much more than point out what the possibilities are and provide a few nice easy examples. If this is what you are looking for then it achieved this goal very well.
If you don't already program then this book isn't for you. Processing is easy to use and the book is an easy read but it makes no attempt to introduce the key programming concepts. However this said if you only program a little what you can achieve with remarkably little work should inspire you to learn more and become a better programmer.
If you want to get started with Processing on Android and want a book on the topic, this is your only choice and for an introduction it is quite good.
|Last Updated ( Wednesday, 05 March 2014 )