Contents

Foreword by Bryce A. Curtis

Foreword by Jim Huempfner

Preface

Acknowledgments

About the Author

Part I PhoneGap

Chapter 1 Introduction to PhoneGap

A Little PhoneGap History

Why Use PhoneGap?

How PhoneGap Works

Designing for the Container

The Traditional Web Server (Web 1.0) Approach

The Web 2.0 Approach

The HTML 5 Approach

Writing PhoneGap Applications

Building PhoneGap Applications

PhoneGap Limitations

PhoneGap Plug-Ins

Getting Support for PhoneGap

PhoneGap Resources

Hybrid Application Frameworks

Appcelerator Titanium

AT&T WorkBench and Antenna Volt

BlackBerry WebWorks

Strobe

Tiggr

Worklight

Chapter 2 PhoneGap Development, Testing, and Debugging

Hello, World!

PhoneGap Initialization

Leveraging PhoneGap APIs

Enhancing the User Interface of a PhoneGap Application

Testing and Debugging PhoneGap Applications

Running a PhoneGap Application on a Device Simulator or Emulator

Running a PhoneGap Application on a Physical Device

Leveraging PhoneGap Debugging Capabilities

Third-Party PhoneGap Debugging Tools

Dealing with Cross-Platform Development Issues

API Consistency

Multiple PhoneGap JavaScript Files

Web Content Folder Structure

Application Requirements

Application Navigation and UI

Application Icons

Part II PhoneGap Developer Tools

Chapter 3 Configuring an Android Development Environment for PhoneGap

Installing the Android SDK

Eclipse Development Environment Configuration

Creating an Android PhoneGap Project

New Eclipse Project

Using Command-Line Tools

Testing Android PhoneGap Applications

Using the Emulator

Installing on a Device

Chapter 4 Configuring a bada Development Environment for PhoneGap

Downloading and Installing the Correct PhoneGap bada Files

Creating a bada PhoneGap Project

Creating a bada Application Profile

Testing bada PhoneGap Applications

Chapter 5 Configuring a BlackBerry Development Environment for PhoneGap

Installing the BlackBerry WebWorks SDK

Creating a BlackBerry PhoneGap Project

Building BlackBerry PhoneGap Applications

Configuring the Build Process

Executing a Build

Testing BlackBerry PhoneGap Applications

Testing on a BlackBerry Device Simulator

Testing on a Device

Chapter 6 Configuring an iOS Development Environment for PhoneGap

Registering as an Apple Developer

Installing Xcode

Creating an iOS PhoneGap Project

Testing iOS PhoneGap Applications

Chapter 7 Configuring a Symbian Development Environment for PhoneGap

Installing the Nokia Web Tools

Installing the Make Utility

Creating a Symbian PhoneGap Project

Configuring Application Settings

Modifying HelloWorld3 for Symbian

Packaging Symbian PhoneGap Projects

Testing Symbian PhoneGap Applications

Chapter 8 Configuring a Windows Phone Development Environment for PhoneGap

Installing the Windows Phone Development Tools

Creating a Windows Phone PhoneGap Project

Testing Windows Phone PhoneGap Applications

Chapter 9 Using PhoneGap Build

The Fit

Getting Started

Configuration

Creating an Application for PhoneGap Build

Creating a PhoneGap Build Project

Upload Options

New Project

The Build Process

Project Configuration

Dealing with Build Issues

Testing Applications

OTA Download

Via Camera

Debug Mode

Part III PhoneGap APIs

Chapter 10 Accelerometer

Querying Device Orientation

Watching a Device’s Orientation

Chapter 11 Camera

Accessing a Picture

Configuring Camera Options

quality

destinationType

sourceType

allowEdit

encodingType

targetHeight and targetWidth

mediaType

Dealing with Camera Problems

Chapter 12 Capture

Using the Capture API

Configuring Capture Options

duration

limit

mode

Capture at Work

Chapter 13 Compass

Getting Device Heading

Watching Device Heading

watchHeading

watchHeadingFilter

Chapter 14 Connection

Chapter 15 Contacts

Creating a Contact

Searching for Contacts

Cloning Contacts

Removing Contacts

Chapter 16 Device

Chapter 17 Events

Creating an Event Listener

deviceready Event

Application Status Events

Network Status Events

Button Events

Chapter 18 File

Available Storage Types

Accessing the Device’s File System

Reading Directory Entries

Accessing FileEntry and DirectoryEntry Properties

Writing Files

Reading Files

Deleting Files or Directories

Copying Files or Directories

Moving Files or Directories

Uploading Files to a Server

Chapter 19 Geolocation

Getting a Device’s Current Location

Watching a Device’s Location

Setting a Watch

Canceling a Watch

Chapter 20 Media

The Media Object

Creating a Media Object

Current Position

Duration

Releasing the Media Object

Playing Audio Files

Play

Pause

Stop

Seek

Recording Audio Files

Start Recording

Stop Recording

Seeing Media in Action

Chapter 21 Notification

Visual Alerts (Alert and Confirm)

Beep

Vibrate

Notification in Action

Chapter 22 Storage

Local Storage

SQL Database

Appendix A Installing the PhoneGap Files

Preparing for Samsung bada Development

Preparing for iOS Development

Preparing for Windows Phone Development

Appendix B Installing the Oracle Java Developer Kit

Downloading the JDK

Installing the JDK

Configuring the Windows Path

Confirming Installation Success

Appendix C Installing Apache Ant

Macintosh Installation

Windows Installation

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset