REVIEW - Android Programming Unleashed


Android Programming Unleashed


B. M. Harwani


Sams Publishing (2013)




Paul Johnson


April 2014



Reviewed: May 2013

Not recommended – not even slightly recommended unless you like levelling up beds and even then, I can think of better books.

This is my first review in what seems an eternity and unfortunately, it's not a good one. The Android market it getting bigger by the minute and with that, more and more books are coming out professing to show you how, in 200 pages, you can go from a user to someone who can create an app that redefines the landscape for apps out there. This is no exception.

It starts by wasting the first chapter telling you how to install the Android SDK. Why? The installer pretty much does everything for you now. Sure you may need to know how to set up the emulators and you may wish to not just accept the defaults, but why waste a chapter on it? That said, I have the same issue with most books of this ilk; “let’s use a chapter to show some screen dumps of how to install Visual Studio”. Just annoying.

Okay, that bit over. What’s left? Code errors everywhere, poor explanations of how things work and why they’re done like that and did I mention stuff that plain doesn’t compile? No? There is quite a bit of it.

Ok, let’s look at a particular example on page 188. A nice simple media player.

public class PlayAudioAppActivity extends Activity {     @override     public void onCreate(Bundle savedInstanceState)     {         super.onCreate(savedInstance);         setContentView(R.layout.activity_play_audio_app);         Button playButton = (Button)findViewById(;         playButton.setOnClickListener(new Button.onClickListener()         {             public void onClick(View v)             {                 MediaPlayer mp = MediaPlayer.create(PlayAudioAppActivity.this, R.raw.song1);                 mp.Start();             }         });     } };

Looks ok, except for the 2 lines that do anything – ( MediaPlayer mp = ... and mp.Start() ) What’s it doing? That’s right, it creates an instance using the Activity context and then uses a file in the raw directory. What rawdirectory? Unless the author created one, there isn’t one. It then starts the media player. No sort of trapping or defensive coding, just hey, it works or I’ll leave you to puzzle out why it didn’t – and given quite a lot of the code is written in the same way, the poor ol’ user is left scratching their head and wondering why SAMs didn’t include a source code CD or not limit getting the code for 30 days past purchase of the book. Now, let’s add some insult to injury. The book claims to cover up to 4.1.2, so let’s look at something that varies massively over the versions – animation. Prior to version 3, animation was pretty awful. It worked, but wasn’t really that good.

Google rewrote huge chunks for version 3 and animation was there and happy. What does this book say about the differences? Nothing. It sticks to what is there prior to version 3. The only saving grace is the section on using animation using XML.

Android comes with SQLite databases as standard. Why then does the author go about creating a custom database using ArrayLists?

I could really rip into this book and I mean seriously rip into it, but at the end of the day life is too short to waste my time trying to find code in there that works as it should.

Given the author is also a time-served lecturer with an ‘easy to understand’ style, I’m amazed this managed to get past the technical editor’s eye – unless said technical editor is one of his students...

Book cover image courtesy of Open Library.

Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED

By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED

Settings can be changed at any time from the Cookie Policy page.