20 Recipes for Programming PhoneGap
Cross-Platform Mobile Development for Android and iPhone
Publisher: O'Reilly Media
Final Release Date: March 2012
Pages: 78

Gain hands-on experience with the amazing PhoneGap library, using the practical recipes in this handy guide. With these solutions, you can enable your mobile web apps to interact with device-specific features such as the accelerometer, GPS, camera, and address book. Learn how to use your knowledge of HTML, CSS, and JavaScript to build full mobile apps for iOS, Android, and several other platforms without rewriting apps in the native platform language. Each recipe includes sample code you can use in your project right away, as well as a discussion of why the solution works.

  • Add functionality that’s available only on a certain device or platform
  • Retrieve the device’s current GPS location and place a marker on a map
  • Create and save a new contact or edit an existing contact in the address book
  • Take pictures with the camera or select one of the user’s existing photos
  • Upload a file from the local device to an external server
  • Allow the device to record audio or video through your app
  • Enable your application to save files locally
Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreilly20 Recipes for Programming PhoneGap
 
3.0

(based on 5 reviews)

Ratings Distribution

  • 5 Stars

     

    (0)

  • 4 Stars

     

    (2)

  • 3 Stars

     

    (2)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (1)

80%

of respondents would recommend this to a friend.

Pros

    Cons

      Best Uses

      • Novice (3)
        • Reviewer Profile:
        • Developer (4)

      Reviewed by 5 customers

      Sort by

      Displaying reviews 1-5

      Back to top

      (1 of 1 customers found this review helpful)

       
      4.0

      Good starter

      By play75010

      from Paris, France

      Verified Reviewer

      Comments about oreilly 20 Recipes for Programming PhoneGap:

      Very good way to start a phonegap app.

      Alas, this uses phonegap-1.0.0. Current version is 2.5.0.

      Is there a planned update ?

       
      4.0

      20 Recipes for Programming PhoneGap

      By Fabio Alessandro Locati

      from Milan, Italy

      About Me Developer

      Verified Reviewer

      Pros

      • Accurate
      • Easy to understand
      • Helpful examples

      Cons

      • Not comprehensive enough

      Best Uses

      • Intermediate
      • Novice
      • Student

      Comments about oreilly 20 Recipes for Programming PhoneGap:

      This book starts with a little introduction and with the instructions to setup the environment. After this, the book starts at full speed with "the Recipes". The structure based on Recipes is what I liked the of this book.

      Every Recipe has the structure:
      - Problem
      - Solution
      - Discussion
      I think that this is a very powerful structure because in this way we can learn from the obstacles that each one of us can encounter in his way while coding. Also, this structure, gives to the reader the choice of what read when. In fact, is possible to read this book from the first page to the last or to pick the single arguments that are useful to him in that precise moment.

      Another thing that I really liked about this book is the fact that Jamie Munro uses in the same time PhoneGap and jQuery Mobile so you can learn two libraries in the same time and you can learn immediately to write an application that is nice to see and use.

      I really liked this book and I would suggest this book to everyone is interested in using the PhoneGap framework to develop Mobile applications.

       
      3.0

      Good enough

      By Bradut

      from Vancouver, Canada

      About Me Developer

      Verified Reviewer

      Pros

      • Helpful examples
      • Interesting
      • Well-written

      Cons

      • Laconic
      • No Screen Captures
      • Some errors

      Best Uses

      • Intermediate
      • Novice

      Comments about oreilly 20 Recipes for Programming PhoneGap:

      Just finished reading and practicing the "20 Recipes for Programming PhoneGap" with mixed feelings: by one hand, I learned many things [ I am a beginner in this kind of programming], and by the other hand I accumulated huge amounts of frustration, because the explanations were pretty laconic, non intuitive, and some examples didn't work to me.
      For the good things, I would say that each recipe got me learn jQueryMobile and PhoneGap API. The examples are interesting and useful for the future hybrid apps I may write sometime. I liked that, when explaining the "Accessing the Camera and Photo Album", the author realized that in the simulator we cannot use the camera [seems to be a bug introduced with Android 2.2], and explained how to use the photo library instead. This was helpful especially for the next chapter, which demonstrated how these images could be sent to a remote server. I would only add [for other readers] that, in order to get the pictures in the simulator, one may use the simulator's web browser app to download images from internet.

      Unfortunately, not all things were so good:
      - From the very beginning it was not obvious that these examples will work only packaged as PhoneGap applications, and they will not work in a Webkit browser. I had this problem because I wanted to use the JavaScript debuggers provided by Safari and Chrome to see how the code worked. [Some examples can actually run in desktop browser after installing the Ripple Emulator plug-in for Google Chrome].
      - The very interesting recipe "Saving data to a Remote Server" didn't work, [at least with author's server].
      - The last recipe, "Extending PhoneGap with Plug-ins", was quite disappointing, as, right in the middle of the implementation, the author "sent" me to get code from another website, which I could not compile as it had quite a lot of dependencies. I believe that a simpler and self contained example would be more useful.
      There were some other minor things, such as the omission of the "images"sub-directory in the css directory, or the need to make the "intervalID" variable global in the common.js [in the HelloWorldPhoneGap.zip file that accompanies the book ]

      In conclusion, I believe that, despite some issues, this is a good starting book, with valuable examples; and those few errors are inherent in the first edition. Fixing the problems and adding screen captures, [see Jonathan Starks' excellent book "Building iPhone Apps with HTML, CSS, and JavaScript"] would help a lot.

       
      1.0

      wait for version 2

      By Peter

      from Brighton

      About Me Developer

      Verified Reviewer

      Pros

        Cons

        • Too many errors

        Best Uses

          Comments about oreilly 20 Recipes for Programming PhoneGap:

          This book gives you some idea of what phone gap can do but it has some many coding errors I'm not sure I can trust the content. The every first piece of javascript has an error which causes it to fail. The problem is I'm very new to Javascript but have a programming background not sure how others will get on with it.

          (1 of 1 customers found this review helpful)

           
          3.0

          Get cooking with PhoneGap

          By sandyboy55

          from St Louis, MO

          About Me Designer, Developer

          Verified Reviewer

          Pros

          • Accurate
          • Concise
          • Easy to understand
          • Well-written

          Cons

            Best Uses

            • Novice
            • Student

            Comments about oreilly 20 Recipes for Programming PhoneGap:

            This is a small, concise book of about 76 pages containing a variety of recipes using PhoneGap to build device agnostic applications using GPS location, maps, media, accelerometers, and much more. This book assumes you already know the basics of PhoneGap and will point you to the "Getting Started" link if you are not already familiar with using PhoneGap. You will also need to download jQuery and jQuery mobile library and setup your system before trying any of the recipes. It's not that difficult though and you should be doing that before picking this recipe book.

            Each of the 20 recipe provides a systematic Problem/Solution/Discussion/Code format. From simple recipes to detect if the device is ready, detecting network status changes, retrieving device information, the book advances to more complicated recipes like using the GPS and displaying a position on a map, using the compass for navigation, using the accelerometer, etc. It also has recipes on saving data to a remote server, capturing audio and video, and extending PhoneGap with plug-ins.

            The nice thing about this book is that it is easy to read and recipes can be quickly tried out. I finished reading this book in about an hour. It has found a place in my reference shelf to reach out to when needed.

            Displaying reviews 1-5

            Back to top

             
            Buy 2 Get 1 Free Free Shipping Guarantee
            Buying Options
            Immediate Access - Go Digital what's this?
            Ebook: $12.99
            Formats:  DAISY, ePub, Mobi, PDF
            Print & Ebook: $16.49
            Print: $14.99