Free Sample
+ Collection

PhoneGap Mobile Application Development Cookbook

Matt Gifford

With your JavaScript, HTML, and CSS skills, you just need to add PhoneGap to start creating native mobile apps for cross-platform devices. The 40+ recipes in this book will show you how, speedily and practically.
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849518581
Paperback320 pages

About This Book

  • Use the PhoneGap API to create native mobile applications that work on a wide range of mobile devices
  • Discover the native device features and functions you can access and include within your applications
  • Packed with clear and concise examples to show you how to easily build native mobile applications

Who This Book Is For

This book is for creative professionals, ideally with web development experience, who are interested in building applications for the emerging mobile market but do not want to learn a new SDK for every phone on the shelf. You should be comfortable with JavaScript, HTML, and CSS, and interested in learning the new advances in those technologies that allow for rich, native-style experiences. This book supports a beginner to advanced level of PhoneGap.

Table of Contents

Chapter 1: 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
Chapter 2: 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
Chapter 3: 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
Chapter 4: Working with Your Contacts
Listing all available contacts
Displaying contact information for a specific individual
Creating and saving a new contact
Chapter 5: 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
Chapter 6: 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
Chapter 7: User Interface Development with jQuery Mobile
Creating a jQuery Mobile layout
Persisting data between jQuery Mobile pages
Using jQuery Mobile ThemeRoller
Chapter 8: Extending PhoneGap with Plugins
Extending your Cordova application with a native plugin
Extending your Cordova iOS application with a native plugin
The plugin repository
Chapter 9: 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

What You Will Learn

  • Build your application to interact with real-time sensor data
  • Learn how to store data and cache data and content using HTML5 storage APIs
  • Access the camera of the device to create a seamless multimedia workflow
  • Set up your PhoneGap mobile development environment
  • Think mobile: develop with size in mind using lightweight JavaScript frameworks
  • Access the contact database of your device
  • Enhance your application by creating custom plugins built using custom native code
  • Use HTML5 and CSS3 in your mobile applications

In Detail

As more and more of our online life and daily activities evolve into the mobile landscape it has never been of more importance to start venturing into the world of mobile applications.
With PhoneGap, you can put your existing development skills and HTML, CSS, and JavaScript knowledge to great use by creating mobile apps for cross-platform devices.

"PhoneGap Mobile Application Development Cookbook" will show you how to create native mobile applications for multiple device platforms using the PhoneGap API. You will learn to build dynamic applications that interact with the native functionality on the device to create a rich, interactive experience for your users.

This is a cookbook with each section written as a recipe in an informal, friendly style. Each recipe contains the complete code needed to build your applications, and plenty of screenshots showing the completed projects running on devices are included to assist you.

"PhoneGap Mobile Application Development Cookbook" will introduce the PhoneGap API to you in clear, concise sections, breaking down each recipe to achieve realistic working projects that can be applied to your own mobile applications.

You will be shown how to use the mobile development framework to build applications that can be deployed and run on multiple mobile platforms including iOS, Android, and BlackBerry.

This book will explore the various methods and functions available using the API, and how to write code that interacts with the native functions, including geolocation sensors, contacts database, and native button events of the device to create powerful applications ready for the market place.

"PhoneGap Mobile Application Development Cookbook" will help you break into the world of mobile application development. Build mobile applications in code you’re comfortable with, create a richer user experience for your users and become part of the ever-growing mobile market place.


Read More