Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
Android Books Google Book Reviews News

Android Application Development 74

Posted by samzenpus
from the read-all-about-it dept.
stoolpigeon writes "Google's mobile OS Android has received plenty of press. As with a lot of Google products, there was much anticipation before any devices were even available. Now a number of phones are available, with many more coming out world-wide in the near future. Part of the lure of Android is the openness of the platform and the freely available tools for development. The SDK and accompanying Eclipse plug-in give the would be creator of the next great Android application everything they need to make their idea reality. The bar to entry in the official Google Android Marketplace is very low and it doesn't seem to be much of a stretch to predict that the number of developers working on Android is only going to grow. As with any hot technology the number of books will grow as well and O'Reilly's Android Application Development has jumped into the fray, promising to help budding Android developers what they need to get started." Read on for the rest of JR's review.
Android Application Development: Programming with the Google SDK
author Rick Rogers, John Lombardo, Zigurd Mednieks, Blake Meike
pages 332
publisher O'Reilly Media Inc.
rating 7/10
reviewer JR Peck
ISBN 978-0-596-52147-9
summary Programming with the Google SDK.
The book begins with a brief introduction to Android followed by detailed instructions on procuring and installing the Android SDK. Space is given to Windows, Linux and Mac. The install is relatively simple on all three platforms, extra information is provided for Ubuntu users but no others distributions. Extra care is taken to help Windows users with items they may not use regularly, such as environmental variables. This is all pretty basic and gives the book very much of a 'for beginners' feel. Before I had the book I had already installed the SDK and Eclipse plug-in on Windows, Ubuntu and Fedora without any issues beyond getting a current version of Eclipse for the Ubuntu machine. The version I already had from the Ubuntu repositories was not able to run the plug-in. It's a short chapter and if someone really struggles with it, they probably should shift their focus from learning to code to learning how to use their platform of choice. This does set the tone though, that this is a book for those who are very new to development.

Chapter two steps the reader through the ever present "Hello World" and gives an overview of the structure of Android applications. Chapter three introduces the example application that will be used for the rest of the book. There is a lot of repetition here on just what directories and files make up the guts of an Android program. I was quickly worried ( the first four chapters are only fifty-six pages in ) that maybe four authors had been too many. The repetition made it feel as if separate work had been combined without enough editing to remove what was redundant. Fortunately this got better, though there was still a strange proclivity to list files while referring to earlier chapters that explained their purpose. This would be helpful to anyone jumping right into the middle of the book, but the index also serves the same purpose and saves space for more valuable content, as opposed to explaining the purpose of AndroidManifest.xml repeatedly.

Once I moved into the fifth chapter, Debugging Android Applications and the following chapters, things got better. The pace picked up and the repetition dropped off for the most part. The book did not become incredibly difficult, trying to be everything to everyone, but did maintain an introductory style. At the same time the example application makes use of many Android features that are likely to be used by developers. How to set up and use tools was covered step by step. This is very nice but did cause some issues for the authors due to the rapid pace of development on Android. A visit to the book's errata page will show that many readers struggled with changes to the SDK tool set that came out very shortly after the book. The authors say that future editions will fix these issues, but this creates a dilemma for that reader needing introductory level materials. They are more dependent upon the book than a more advanced user and so these issues can be very trying. Based on the responses to the errata posts it became trying for the authors as well. This isn't a knock on the book itself but rather a limitation of the delivery method.

Once the reader is digging down into the example application the team approach to writing the book does become an asset. The authors bring a number of skills to the table that closely resemble the players that would be necessary to a team developing a real-world application. The reader is now being pulled into an example that benefits from the knowledge of each and does a good job of exploring the range of options an Android developer has available. This includes core functionality, UI options and how to best take advantage of the platform while at the same time taking performance and user expectations into account. I felt like I was getting something beyond the excellent documentation provided by Google. This is where I felt the book stood strongest.

Working with a single, large example application was a move that probably helped move things along on writing the book and I think it's an interesting approach. The problem is of course, that means that this example must be right. Right for the task and technically correct. Small issues in the code are inevitable but now their impact is book wide. The changes to the platform just made it just that much more difficult to sort out. On the whole I still found this to be a better approach primarily due to the fact that it gives the features highlighted a better sense of context. Stand-alone examples are often good at highlighting technical features but completely ignore the issues necessary to using the feature in a larger piece of code.

I'm a fan of O'Reilly books. Interestingly enough this doesn't mean that I'll gloss over issues with what they produce. The result is actually the inverse, in that I go into all their titles with a high level of expectation with regards to quality on every level. This may mean that though I strive to be neutral when I look at a book, I'm probably a little tougher on O'Reilly titles. This made my rough start with Android Application Development a bit jarring. The repetition and what felt like sloppy editing are not what I expect. I was quickly given a sense that this book may have been rushed to publication a little sooner than it should have been. As I moved deeper into the book, things improved and while I think there were still editorial issues, things did seem to smooth out to some degree.

There is an interesting tension that exists purely do to the nature of print books. I don't like to bring up print versus electronic in reviews as I don't think it is on topic, but here it is unavoidable. The book is aimed at people that need a little more hand holding and help getting going. It does a good job of providing step by step instructions, the problem is that some of those steps have changed. I don't think anything in the code itself needs to be different, but the tools have changed enough that getting the code to run in a development environment against the new SDK is different. That means that portion of the book is no longer of as much value without going to other sources to find the new steps.

That said, warts and all I found this to be a helpful way to get my feet wet with Android. I really look forward to future versions as I think just a little more time and work will move this from my 'good' list to my 'great' list. Making things a little tighter and cleaning up the few typos and errors would certainly make this an 8 instead of an 7, which is really substantial in my mind. I'm no super developer and I need stuff like this, that can take things a little more slowly and make it all clear. I think this guide is great for those of us in that category as long as the reader is o.k. with hopping to external sources for the information they'll need to get the newer tool set working.

You can purchase Android Application Development: Programming with the Google SDK from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

Android Application Development

Comments Filter:
  • for android users: (Score:5, Informative)

    by poetmatt (793785) on Monday October 12, 2009 @01:21PM (#29721907) Journal

    cyanogenmod + enochx = much more visually appealing, many features added to your phone.

    Rooting is not as complicated as it used to be - meanwhile, there are lots of sites out there on programming an android phone with great info, even google's. [android.com]

    • by dada21 (163177)

      +1 on this.

      My G1 runs incredibly well and consistently with CM + Enoch. I can't believe what a difference it is from my corporate phone (identical G1 but running T-Mobile's latest ROM).

      • by poetmatt (793785)

        damn, what company do you work for that lets you have a G1 for a corporate phone? I'm stuck at a workplace that sticks with blackberry only, etc.

        • That's because a BlackBerry lets them control their company data. And decide to allow/deny every little function of the device.

          Unfortunately, with phones, fun != good for business. Though they sometimes overlap.

  • by BadAnalogyGuy (945258) <BadAnalogyGuy@gmail.com> on Monday October 12, 2009 @01:24PM (#29721975)

    The one really big hurdle which Android faces and which WinMo and iPhone have worked around is the problem of a moving target. Since Android is a work in progress, with OEMs deciding which version to release, there is only a core set of functionality that could be expected to exist across all versions on all phones. Now, this core set of functionality may be very large and useful, but without a rigorous breakdown of the differences between devices it still feels like a crapshoot.

    Attention to this "always in beta" aspect of developing on the Android platform would have been nice. Of course, Google just wants people developing apps and not worrying about how things may change. Unfortunately, this is a serious concern for developers of enterprise applications, and it may end up being Android's Achilles Tendon in the long run.

    • by rxan (1424721)

      Actually, applications developed on earlier API levels (as Android calls them) are always forward compatible with newer API levels. Sure, APIs may be deprecated and replaced with newer interfaces, like any platform, but it won't cause your app to break as you are implying.

      With the new Android SDK things like different screen sizes are being allowed, which I consider a boon. The one thing that always bugged me about BlackBerry was the different screen sizes and device capabilities. Now Android developers h

    • by salesgeek (263995)

      Actually, Android's "always in beta" has been a boon for users. The package management system is a boon for developers. I bought my phone nearly one year ago and periodically it tells me there is a system update. After the update things are usually much better. It shouldn't be a concern for enterprise developers familiar with developing for Linux - upgrades are handled very automatically, and distributing and installing software is easy. It really isn't much more different than writing for any stack -

    • by 0xdeadbeef (28836)

      The one really big hurdle which Android faces and which WinMo and iPhone have worked around is the problem of a moving target.

      What does this mean? Do you have any understanding of what you're talking about? Please explain to us how these other platforms "worked around" this issue.

    • Beta doesn't have an impact when you're constantly downloading 2.7GB Xcode-based SDKs that change from version 3.1.1 o 3.1.2 (from the current leader in the smart phone market). Even MSVS makes you wait a year before downloading a few gigs of IDE, not per version of the OS.
      Having to download Eclipse IDE (not the full version) and a plugin is refreshing to the developer and the way it should be done.
    • by mjwx (966435)

      The one really big hurdle which Android faces and which WinMo and iPhone have worked around is the problem of a moving target. Since Android is a work in progress, with OEMs deciding which version to release, there is only a core set of functionality that could be expected to exist across all versions on all phones. Now, this core set of functionality may be very large and useful, but without a rigorous breakdown of the differences between devices it still feels like a crapshoot.

      Attention to this "always

  • O'reilly books (Score:4, Informative)

    by dslbrian (318993) on Monday October 12, 2009 @01:47PM (#29722311)

    I'm a fan of O'Reilly books. Interestingly enough this doesn't mean that I'll gloss over issues with what they produce. The result is actually the inverse, in that I go into all their titles with a high level of expectation with regards to quality on every level. This may mean that though I strive to be neutral when I look at a book, I'm probably a little tougher on O'Reilly titles. This made my rough start with Android Application Development a bit jarring. The repetition and what felt like sloppy editing are not what I expect. I was quickly given a sense that this book may have been rushed to publication a little sooner than it should have been.

    IMO, O'Reilly's once stellar reputation has gone downhill since the days when they only had a handfull of titles. I think these days in the rush to churn out a Learning/Mastering/Pocket Reference/Nutshell book for every language and variant thereof their editors miss quite a bit. Now you have to scrutinize their books just as much as the other publishers (although they haven't quite hit the abomination level that the Whatever-Language "Bible" books are that Wiley publishes).

    • by frogola (676494)
      I agree, it's been many years since O'Reilly books were consistently excellent. My first disappointment was 'Security Warrior'. They still have may good titles, though.
  • Google != Android (Score:4, Insightful)

    by dada21 (163177) <adam.dada@gmail.com> on Monday October 12, 2009 @01:58PM (#29722473) Homepage Journal

    Just a reminder: Google and Android are not affiliated in any way any longer except that Google is a member of the Open Handset Alliance (OHA).

    Google bought Android the company, developed Android the OS, then spun it off under control of the OHA, in which they are one participating member.

    When a phone company develops hardware using Android, the operating system is open source/freely available. They can customize it. But if they want to bundle applications on it, say Google Maps, they have to license those apps from Google. Android is not Google, Google is not Android.

    For what it's worth, I run a G1 with Cyanogen's latest mod. I have no Google apps that I care about anymore.

    • by FunkyELF (609131)

      Do you use maps?... what do you use?
      Do you use mail?... what do you use?

    • Re: (Score:2, Interesting)

      OpenHandsetAlliance = Google + Network Carriers + Hardware Manufacturers;

      peoplesChoice = People + OpenMeshPoint2PointNetwork + OpenSoftware + OpenHardware;

      Start making it, or Microsoft/Danger says "all your data are belong to us"
      • Re: (Score:3, Interesting)

        by FooAtWFU (699187)

        Open software / hardware, sure, lovely.

        And the "open mesh point-to-point network" idea is cute too, but doesn't work so well for VOIP and voice (too many hops, ick!) and doesn't work at all unless there's a bunch of people in the area doing it: lots of Silicon Valley hops, sure, but how do you string over the mountains even to a place as close as Santa Cruz? and what's the point if you can't ?

        So I don't see that replacing my network carrier any time soon. Mesh-huggers. Gaah.

        • Re: (Score:2, Interesting)

          That should have read: Mesh+P2P. The details of such could not be spelled out within this comment box.
          Just as our modern "Free" internet is, a new wireless network would have to operate on a variety of technologies. A mesh would actually work out great for metro areas in terms of simple data, handset to handset, but there would have to be more powerful fixed site connections to allow continuity across the lager scope of the project. There is a Ukrainian guy who made a nice point to point with (i think) off
        • by Karpe (1147)

          I believe Santa Cruz Operation is not supported. :)

    • doesn't every app the uses the google (map) SDK require the google components? that's a large percent of the apps. AFAIK, there's no replacement for things like the google SDK, and even if there was, nobody is writing software to utilize it.

      regardless. cyanogen != no google. in 5 steps you can get the latest cyanogenmod with google components, in a google-approved manner.

  • I am a co-author... (Score:4, Informative)

    by Zigurd (3528) on Monday October 12, 2009 @04:16PM (#29724473) Homepage

    I am a co-author of this book. Feel free to ask me about it. If I can't answer, I'll make sure your questions get to the other co-authors and/or our editor.

    • It's my understanding that the apps are done in Java, and it's fairly easy to get the source code to a Java program. If this is so, how do people port their commercially viable applications to Android without other people easily ripping off their source code? Does the book cover any better methods of protecting the source code than "obfuscation"?
      • by Zigurd (3528)

        The book does not cover code obfuscation. I have also not tried obfuscation for Android projects.

        Android applications are distributed as archives -.apk files - made mostly of Dalvik bytecode files - .dex files. While you can "dump" a dex file to human readable code, I do not know of a dex to Java decompiler, nor a dex to Java bytecode reverse translator.

        This thread in the Android developers group...

        http://groups.google.com/group/android-developers/browse_thread/thread/dcc5808b002a47fc?tvc=2 ...includes an

  • First off, let me admit that I have not yet read the Book reviewed here, but from reading the review, it sounds like it is targeted mainly to the "new to programming" crowd.

    I have started my Android Development career by reading Mark Murphy's "Busy Coder's" books, and gotten a lot of details out of his Tutorial book.
    http://commonsware.com/books.html [commonsware.com]

    I'm not affiliated with him, but I'd like to really recommend his books to any developer who has an existing background in either Java and wants to quickly get p

    • by joshki (152061)
      I like Mark Murphy's subscription format as well -- you get all of them for one fee plus updates for as long as you keep the subscription. They're also great books, and they're how I learned.
  • Once you've built your app, how do you market it on the Google app store? Do you need a license or registration to upload it? How do you upload it? Does it have to be signed or otherwise processed after it's an executing binary? How do you get paid? How do you include a GPL or other license, and the source code if required/desired?

    Those details of "development" are going to be the greatest incentive, or inhibitor, to developers. Especially like me.

    • Once you've built your app, how do you market it on the Google app store? Do you need a license or registration to upload it? How do you upload it? Does it have to be signed or otherwise processed after it's an executing binary? How do you get paid? How do you include a GPL or other license, and the source code if required/desired?

      Those details of "development" are going to be the greatest incentive, or inhibitor, to developers. Especially like me.

      You generate a key and sign your binary. Applicable links would be : http://developer.android.com/guide/publishing/app-signing.html [android.com] and: http://developer.android.com/guide/publishing/publishing.html [android.com]

      I recently developed an app for Android. It took a moderate amount of Java programming knowledge and a week or two to crank out a working application (working in my spare time). I figure that's a pretty resounding endorsement of the SDK.

    • by mjwx (966435)

      Once you've built your app, how do you market it on the Google app store?

      Marketing is entirely up to you, there is no "staff pick" or other kind of rigged personality contest. Advertise by any method you see fit, you can even direct link to the Android marketplace by URL or QR code from another web site or even a print or web ad using a QR code. QR codes on Cyrket [cyrket.com] are useful as I can brows the market on my PC and then use a bar code scanner to take my phone straight to the installer page on the marketplac

      • by joshki (152061)

        Just a few nits to pick:

        Google does have a "featured apps" section. I'm not sure how they determine what gets featured, but it does exist.

        Uploading the binary is as simple as filling out a web form -- just fill in the details, select the binary, and hit submit.

        Google does require you to sign your binaries. It's a simple process, it can be done either from the plugin in Eclipse or manually.

        Google does vet the app store, just not the same way as Apple does theirs. When you upload an app, you have to ve

        • by mjwx (966435)
          As far as I've been able to tell, the "featured apps" section at the top of the Marketplace seems to be pretty random but I've noticed that they have a high user rating (3.5+ stars) and a significant number of downloads so I'm guessing it just randomly picks app's that meet the minimum criteria.
  • by cenc (1310167) on Monday October 12, 2009 @07:31PM (#29726787) Homepage

    I have to hand it to Google for trying to break the proprietary locked cell phone one trick pony problem, but so far everything I have seen indicates that we just have another locked up OS. This is free software for the handset makers, not the end user.

    What we want and need is a fully Linux, no bs platform, no hidden anything. So far, the nokia n900 looks like it will do that. Especially with the announcement of the qt libraries will be in the next versions of maemo.

    I am sick of being treated like a criminal for jail-breaking / accessing my own hardware and software that I payed lots of money to own and use as I see fit. F*** Google and all their handset Android makers. I am voting with my dollars and my companies dollars, and going with a full linux distro I can customize as needed for my business.

    Now I just hope Nokia does not get stupid and drop the ball. They seem to have a tendency to loose their momentum.

  • I always think it is appropriate to have a section on getting things setup. If you are going to write a book about development for a platform you better be ready to be thorough. If you start assuming things then your book will suck, and believe me I have had to go through a lot that have. The only exception I would make is if you have something like "advanced" in the title or something. I have been programming for over 20 years, and anytime I have to setup anything that isn't integrated I need some help to
  • I have been working on a windows mobile app in my spare time for the last year or so in C# and it has been a serious pain. I have really enjoyed all of what the Android API has to offer. I found it ridiculous that I had to implement my own view stack in windows mobile or see all of my views as separate windows on the device, Android handles this very well on its own.

The meta-Turing test counts a thing as intelligent if it seeks to devise and apply Turing tests to objects of its own creation. -- Lew Mammel, Jr.

Working...