PacktLib: PhoneGap 3 Beginner's Guide

PhoneGap 3 Beginner's Guide

Credits

Foreword

About the Author

About the Reviewers

www.PacktPub.com

Preface

Getting Started with PhoneGap

PhoneGap and Apache Cordova

The evolution of PhoneGap from 1.4 to 3.x

A note about operating systems

A note about the command-line tool

Installing PhoneGap

Installing dependencies

Setting up your development environment

Time for action – setting up Android using PhoneGap 2.x

Time for action – setting up iOS using PhoneGap 2.x

Time for action – setting up Windows Phone using PhoneGap 2.x

Getting Started with Android and Eclipse

Time for action - installing ADT into Eclipse

Getting started with iOS and Xcode

Getting started with Windows Phone and Visual Studio

Creating a common code base for multiplatform apps

Summary

Building and Debugging on Multiple Platforms

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

Summary

Getting Started with Mobile Applications

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

Summary

Architecting Your Mobile 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

Summary

Improving the User Interface and Device Interaction

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

Summary

Using Device Storage and the Contacts 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

Summary

Accessing Device Sensors

What are device sensors?

Accelerometer

Time for action – detecting shakes in your app

Time for action – handling device orientation with JavaScript

Compass

Time for action – using the Compass API

Summary

Using Location Data with PhoneGap

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

Summary

Manipulating Files

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

Summary

Capturing and Manipulating Device Media

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

Summary

Working with PhoneGap Plugins

Introduction to plugins

Working with plugins

Time for action – using push notifications on Android

Summary

Localizing Your App

Localizing Your App

Localizing Your App

Publishing Your App

Publishing Your App

Publishing Your App

Publishing Your App

Publishing Your App

Publishing Your App

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Index