Author: Richard Wagner
Publisher: Wrox, 2011
Aimed at: Existing ActionScript programmers
Pros: Lots of well presented examples with downloadable code
Cons: Poor code indentation and lack of explanation
Reviewed by: David Conrad
An increasing number of mobile developers are taking Flash seriously as a way of creating a single app that runs on Android and iPhone - and perhaps more will adopt this approch in the future. The subtitle of this book, "Creating Android and iPhone Applications", tells you immediately that this book aims to tell you how to develop for both platforms. It assumes that you know ActionScript and makes no attempt to teach you the language of Flex.
In case you are in any doubt the development approach is to use Adobe AIR which is the "out-of-browser" implementation of the Flash platform.
The book starts off with a look at the AIR system how to download it and install it for Android and iPhone development. It also gives you a good overview of what it is, how it works and what its limitations are in accessing the phone's hardware in each case. The instructions for setting up the relevant development environments seem complicated, but that's not really the books fault. The instructions are also going to go out of date fairly quickly - the Android instructions already don't cover Android 3.0, for example. However this doesn't matter because the general form of the procedure stays more or less the same - but you are going to have to check the websites for the details.
Chapter 3 is about creating, installing and running a basic "vanilla" application called VanillaApp. Instructions for doing this are given for both phones. After this, however, the book assumes that you know how to work with each of the environments and it concentrates on writing AIR programs with minimal reference to the target hardware.
Part II of the book deals with touch and general user interaction. However, first we reconsider AIR programming in the light of the limited resources available on a mobile phone. A set of recommendations is given for what features of ActionScript you should and should not use if you want your application to run at a reasonable speed. These suggestions are fairly easy to understand and follow.
Even if you have programmed with AIR before you are going to have to learn how to write touch event handlers in one form or another. Later chapters in this section cover using the accelerometer, working with orientation, the geolocation API, using SMS and making phone calls and using the Android camera.
Part III is on data - with a single chapter on file management and a single chapter on local databases. The final part, IV, is also composed of just two chapters and is on testing and debugging, including some comments on how to get you app into the app store.
This is a very nice book. It comes with lots of well presented examples. There isn't much detailed discussion of the examples but in the main this doesn't matter because what they do and the way they work should be very easy to understand by reading them. There are often some bad lapses in layout, however, with some very strange indentation. All the code can be downloaded so the odd layout isn't a big problem.
As long as you already know ActionScript then you should find this a good way to get into Flex mobile programming.
Overall this is a useful book that will get you started with Flash on the Android and iPhone. It has lots of practical advice and it makes clear what you can and cannot do with mobile Flash. It also provides some simple examples of how to work with the major facilities.