更新时间:2021-07-16 13:22:47
封面
版权信息
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Chapter 1. Introduction to PhoneGap
About PhoneGap
PhoneGap and Apache Cordova
Choosing an operating system for development
Mobile web versus mobile app
Installing dependencies
Installing PhoneGap
Setting up your development environment
Time for action – setting up Android using PhoneGap 3.x
Getting started with Android and JBoss
Time for action – using JBoss Developer Studio
Getting started with iOS and Xcode
Getting started with Windows Phone and Visual Studio
Summary
Chapter 2. Building Your First PhoneGap Project
The structure of a PhoneGap application
Using the PhoneGap CLI
Cordova events
Time for action – the Hello World example
WebKit debugging – Chrome Safari and Opera
Gecko debugging – Firefox
Internet Explorer
Debugging workflow
Building and deployment
Chapter 3. Mobile Frameworks
Building native UI for the mobile
Achieving a native look and feel on iOS
Choosing mobile frameworks
Time for action – developing with jQuery Mobile
Selecting a framework
Chapter 4. Working with Plugins
An introduction to plugins
Exploring the Device API
Time for action – accessing the Device API
Custom plugins
Chapter 5. Using Device Storage and the Files API
Application data storage
Time for action – reading and writing data on the LocalStorage
Time for action – populating a local database
Database limitations
Understanding the Files API
Time for action – listing folders
Time for action – reading and rendering an image
Time for action – downloading and saving a file
Chapter 6. Using the Contacts and Camera APIs
The Contacts API
Time for action – searching device contacts
Time for action – adding a new contact
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 Media Capture API
Time for action – manipulating images with a canvas
Chapter 7. Accessing the Device Sensors and Locations API
Introducing device sensors
Accelerometer
Time for action – handling device orientation with JavaScript
Compass
Time for action – using the Compass API
An introduction to geolocation
The PhoneGap Geolocation API
Time for action – showing device position with Google Maps
Chapter 8. Advanced PhoneGap
Using the Globalization API
Localizing your app
Time for action – rendering localized messages
Adding multitouch gesture support
Time for action – implementing gesture support
Handling click delays
Chapter 9. Getting Ready for Release
Exploring JavaScript compression
Time for action – compressing files using the Closure Compiler
Time for action – using UglifyJS
Time for action – optimizing JavaScript with RequireJS
Comparing compression tools
Using template engine compression
Time for action – compiling a template using Pistachio
Creating fluid multiple app views
Using hardware-accelerated transitions
Porting web applications
Chapter 10. A Sample PhoneGap Project
What's in the app?
Creating the project