PhoneGap 3 Beginner's Guide

More Information
  • Set up and configure your development environment
  • Manage cross-platform code bases
  • Build well-performing modular apps
  • Interact with the device sensors, file system, and camera
  • Use key PhoneGap APIs
  • Integrate native code in your mobile app
  • Write a PhoneGap plugin
  • Localize a mobile app

You don’t have to know complex languages like Objective C to compete in the ever-growing mobile market place. The PhoneGap framework lets you use your web development skills to build HTML and JavaScript-based mobile applications with native wrappers that run on all the major mobile platforms, including Android, iOS, and Windows Phone 8.

"PhoneGap 3 Beginner's Guide" will help you break into the world of mobile application development. You will learn how to set up and configure your mobile development environment, implement the most common features of modern mobile apps, and build rich, native-style applications. The examples in this book deal with real use case scenarios, which will help you develop your own apps, and then publish them on the most popular app stores.

Dive deep into PhoneGap and refine your skills by learning how to build the main features of a real world app.

"PhoneGap 3 Beginner's Guide" will guide you through the building blocks of a mobile application that lets users plan a trip and share their trip information. With the help of this app, you will learn how to work with key PhoneGap tools and APIs, extend the framework’s functionality with plug-ins, and integrate device features such as the camera, contacts, storage, and more. By the time you’re finished, you will have a solid understanding of the common challenges mobile app developers face, and you will know how to solve them.

  • Understand the fundamentals of cross-platform mobile application development from build to distribution
  • Learn to implement the most common features of modern mobile applications
  • Take advantage of native mobile device capabilities—including the camera, geolocation, and local storage—using HTML, CSS, and JavaScript
Page Count 308
Course Length 9 hours 14 minutes
ISBN 9781782160984
Date Of Publication 23 Sep 2013
Development tools
Time for action – configuring the cloud service in Bracket
Native, web, and hybrid apps
Working with desktop browsers
Mobile debugging workflow
Remote debugging
Time for action – configuring iWebInspector for iOS debugging
Time for action – configuring Node.js and weinre
Time for action – integrating Edge Inspect and weinre
Mimicking mobile counterparts
Mobile-centric HTML/CSS/JavaScript
Performance best-practices
Understanding screen size and pixel density
Time for action – scaling UI images according to pixel density
Writing effective JavaScript
Choosing web app templates
Setting up your project using cordova-cli
Time for action – installing cordova-cli using npm
Your first application – "Hello World"
Time for action – creating your first cross-platform app
Time for action – programmatically opening a modal window using Bootstrap
Achieving a native look and feel on iOS
Time for action – setting up a native-like CSS for your app
Fine-tuning your development environment
Time for action – customizing the shell
Time for action – enabling Live Reload
Reviewing the JavaScript guidelines
Exploring the sample app
Building the app's core
Time for action – Require.js Bootstrap
Time for action – creating a Mustache template
Time for action – loading and parsing a template
The splash screen
Time for action – adding a splash screen to your app
Exploring JavaScript compression
Time for action – compressing files using the Closure Compiler
Time for action – using UglifyJS with the Closure Compiler
Time for action – optimizing JavaScript with Require.js
Comparing compression tools
Using template engine compression
Time for action – compiling a template using pistachio
Handling a retina display user interface
Time for action – user interface elements and retina display
Creating fluid, multiple app views
Time for action – accessing the device API
Time for action – creating the templates
Using hardware-accelerated transitions
Getting started with the PhoneGap APIs
Exploring the Connection API
Application data storage
Time for action – reading and writing data on the LocalStorage
Time for action – populating a local database
Database limitations
The Contacts API
Time for action – filtering device contacts
What are device sensors?
Time for action – detecting shakes in your app
Time for action – handling device orientation with JavaScript
Time for action – using the Compass API
An introduction to Geolocation
The PhoneGap Geolocation API
Time for action – showing device position with Google Maps
Time for action – discovering places with Google Places
Understanding the Files API
Time for Action – listing folders and files recursively
Time for Action – reading and rendering an Image
Time for Action – downloading and saving a file
Camera API or Capture API?
Accessing the camera using the Camera API
Time for action – accessing the device camera
Time for action – controlling the position of the camera roll
The Capture API
Time for action – manipulating images with a canvas
Introduction to plugins
Working with plugins
Time for action – using push notifications on Android


Giorgio Natili

Giorgio Natili is an author, educator, community leader, and lead UI engineer at McGraw Hill Education; he is also a publisher of print and digital information services for the academic, professional, and library markets.

At McGraw Hill, he is involved with multiple client-side teams on cross-platform mobile and web applications, developing custom components (web and native) and bringing mock-ups to life!

Giorgio was also the founder of GNStudio, a boutique Rome-based development and design studio specializing in engaging and accessible web and mobile experiences.

As a strong proponent of agile development practices, Giorgio's areas of expertise include web standards-based application development, frontend development, gaming, video streaming, iOS development using Swift and Objective-C, Android development, and hybrid development (mobile and wearables).

Giorgio is the founder of Mobile Tea (, a fresh and innovative approach to community tech events, and is involved in several other community-driven events in Italy and the US.