售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
PhoneGap Beginner's Guide Third Edition
Table of Contents
PhoneGap Beginner's Guide Third Edition
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Time for action – heading
What just happened?
Pop quiz – heading
Have a go hero – heading
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Introduction to PhoneGap
About PhoneGap
PhoneGap and Apache Cordova
The evolution of PhoneGap and Cordova
Choosing an operating system for development
Mobile web versus mobile app
Installing dependencies
Java JDK
Apache Ant
Installing PhoneGap
Setting up your development environment
Time for action – setting up Android using PhoneGap 3.x
What just happened?
Working with other platforms
Getting started with Android and JBoss
Time for action – using JBoss Developer Studio
What just happened?
Getting started with iOS and Xcode
Getting started with Windows Phone and Visual Studio
Summary
2. Building Your First PhoneGap Project
The structure of a PhoneGap application
Using the PhoneGap CLI
Cordova events
The deviceready event
The online event
The offline event
The pause event
The resume event
The backbutton event
Time for action – the Hello World example
What just happened?
WebKit debugging – Chrome, Safari, and Opera
Gecko debugging – Firefox
Internet Explorer
Debugging workflow
Building and deployment
Summary
3. Mobile Frameworks
Building native UI for the mobile
The viewport meta tag
Unwanted telephone number linking
Autocorrect
CSS media queries and mobile properties
Screen orientation
Device orientation
Shake gestures
Media capture APIs
Data URI
Achieving a native look and feel on iOS
Choosing mobile frameworks
Using HTML5 Mobile Boilerplate
Using Zurb Foundation
Using Twitter Bootstrap
Ionic framework
ExtJS
AngularJS
jQuery Mobile
Time for action – developing with jQuery Mobile
Selecting a framework
Summary
4. Working with Plugins
An introduction to plugins
Getting started with plugins
Installing plugins
Listing installed plugins
Removing plugins
Using plugins with Plugman
Exploring the Device API
Time for action – accessing the Device API
What just happened?
Custom plugins
Summary
5. Using Device Storage and the Files API
Application data storage
Exploring the PhoneGap LocalStorage API
Time for action – reading and writing data on the LocalStorage
What just happened?
Exploring the PhoneGap SQL storage
Working with database storage in PhoneGap
Time for action – populating a local database
What just happened?
Database limitations
Understanding the Files API
Reading directories and files
Time for action – listing folders
What just happened?
Writing and reading a file's data
Time for action – reading and rendering an image
What just happened?
Transferring files
Time for action – downloading and saving a file
What just happened?
Summary
6. Using the Contacts and Camera APIs
The Contacts API
The ContactName object
The ContactField object
The ContactAddress object
The ContactOrganization object
The Contact object
Filtering contact data
Time for action – searching device contacts
What just happened?
Time for action – adding a new contact
What just happened?
Camera API or Capture API?
Accessing the camera using the Camera API
Time for action – accessing the device camera
What just happened?
Controlling the camera popover
Time for action – controlling the position of the camera roll
What just happened?
The Media Capture API
Time for action – manipulating images with a canvas
Summary
7. Accessing the Device Sensors and Locations API
Introducing device sensors
Sensors and human-computer interaction
Accelerometer
Detecting shakes
Device orientation events
Handling orientation with JavaScript
Time for action – handling device orientation with JavaScript
What just happened?
Compass
Creating a compass
Time for action – using the Compass API
What just happened?
An introduction to geolocation
The PhoneGap Geolocation API
Time for action – showing device position with Google Maps
What just happened?
Other geolocation data
Summary
8. Advanced PhoneGap
Using the Globalization API
Localizing your app
Time for action – rendering localized messages
What just happened?
Adding multitouch gesture support
Time for action – implementing gesture support
Handling click delays
Summary
9. Getting Ready for Release
Exploring JavaScript compression
Google Closure Compiler
Time for action – compressing files using the Closure Compiler
What just happened?
UglifyJS2
Time for action – using UglifyJS
What just happened?
Optimization with RequireJS
Time for action – optimizing JavaScript with RequireJS
What just happened?
Comparing compression tools
Using template engine compression
Time for action – compiling a template using Pistachio
What just happened?
Creating fluid, multiple app views
Using hardware-accelerated transitions
AliceJS
Porting web applications
Summary
10. A Sample PhoneGap Project
What's in the app?
Libraries used
Twitter Bootstrap
jQuery
mMenu
FastClick
Creating the project
Installing plugins
Design of the homepage
Using the Accelerometer API
Using the Device API
Using the Camera API
Using the Capture API
Using the Connection API
Using the Contacts API
Using the Files API
Using the Globalization API
Using the InApp Browser API
Using the Notification API
Using the Splash Screen API
Using the GeoLocation API
Building the app
Scope for improvements
Summary
A. The JavaScript Quick Cheat Sheet
The getElementById() method
The getElementsByTagName() method
The getElementsByName() method
The alert method
The toString() method
The parseInt() method
The getDate() method
The onclick event
The ondblclick event
The window.location object
Selectors using jQuery
B. Publishing Your App
Publishing on Google Play
Publishing on Blackberry World
Publishing on the Apple App Store
Publishing on the Windows Phone Store
Summary
C. Related Plugin Resources
Summary
D. PhoneGap Tools
The PhoneGap Developer App
The PhoneGap Desktop App
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜