20 Recipes for Programming PhoneGap

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

  • Determining Whether the Device Is Ready
  • Retrieving Information About the Device
  • Creating a Persistent Navigation System
  • Detecting the Device’s Network Status
  • Detecting When the Network Status Changes
  • Executing a Callback Function Once the Device Is Ready
  • Detecting When the App Is Moved to the Background or Foreground
  • Using the GPS and Displaying a Position on a Map
  • Using the Compass to Help the User Navigate
  • Using the Accelerometer to Detect Motion
  • Displaying Table-View Data
  • Retrieving Contacts in the Address Book
  • Creating a New Contact in the Address Book
  • Accessing the Camera and Photo Album
  • Saving Data to a Remote Server
  • Capturing Audio and Video
  • Notifying the Device with Alert, Confirm, and Vibrate
  • Storing Data to the Device
  • Reading Data from the Device
  • Extending PhoneGap with Plug-ins

Book Details

  • Paperback: 76 pages
  • Publisher: O’Reilly Media (March 2012)
  • Language: English
  • ISBN-10: 1449319548
  • ISBN-13: 978-1449319540
Download [6.6 MiB]

You may also like...

Leave a Reply