PacktLib: PhoneGap Mobile Application Development Cookbook

PhoneGap Mobile Application Development Cookbook



About the Author

About the Reviewers


Movement and Location: Using the Accelerometer and Geolocation Sensors


Detecting device movement using the accelerometer

Adjusting the accelerometer sensor update interval

Updating a display object position through accelerometer events

Obtaining device geolocation sensor information

Adjusting the geolocation sensor update interval

Retrieving map data through geolocation coordinates

Creating a visual compass to show the devices direction

File System, Storage, and Local Databases


Saving a file to device storage

Opening a local file from device storage

Displaying the contents of a directory

Creating a local SQLite database

Uploading a file to a remote server

Caching content using the web storage local storage API

Working with Audio, Images, and Video


Capturing audio using the devices audio recording application

Recording audio within your application

Playing audio files from the local filesystem or over HTTP

Capturing video using the devices video recording application

Loading a photograph from the devices camera roll/library

Applying an effect to an image using canvas

Working with Your Contacts


Listing all available contacts

Displaying contact information for a specific individual

Creating and saving a new contact

Hook into Native Events


Pausing your application

Resuming your application

Displaying the status of the device battery levels

Making use of the native search button

Displaying network connection status

Creating a custom submenu

Working with XUI


Learning the basics of the XUI library

DOM manipulation

Working with touch and gesture events

Updating element styles

Working with remote data and AJAX requests

Animating an element

User Interface Development with jQuery Mobile


Creating a jQuery Mobile layout

Persisting data between jQuery Mobile pages

Using jQuery Mobile ThemeRoller

Extending PhoneGap with Plugins


Extending your Cordova application with a native plugin

Extending your Cordova iOS application with a native plugin

The plugin repository

Development Tools and Testing


Downloading Cordova

Using the command line to create a new iOS Cordova project

Using Xcode templates for iOS to develop Cordova applications

Using Eclipse to develop Android Cordova applications

Controlling your Android Virtual Device

Using Adobe Dreamweaver to develop Cordova applications

Using the PhoneGap Build service