HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
PDF The popular standard, used most often with the free Acrobat® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
Covers PhoneGap 3.X
Written for experienced mobile developers, Apache Cordova 3 Programming is a complete introduction to Apache Cordova 3 and Adobe PhoneGap 3. It describes what makes Cordova important and shows how to install and use the tools, the new Cordova CLI, the native SDKs, and more. If you’re brand new to Cordova, this book will be just what you need to get started. If you’re familiar with an older version of Cordova, this book will show you in detail how to use all of the new stuff that’s in Cordova 3 plus stuff that has been around for a while (like the Cordova core APIs).
After walking you through the process of downloading and setting up the framework, mobile expert John M. Wargo shows you how to install and use the command line tools to manage the Cordova application lifecycle and how to set up and use development environments for several of the more popular Cordova supported mobile device platforms. Of special interest to new developers are the chapters on the anatomy of a Cordova application, as well as the mechanics of Cordova development. Wargo also covers the development process and the tools you can use to test and debug your Cordova applications, and provides a complete chapter that introduces the Cordova APIs, in addition to a chapter that shows you how to create your own plugins.
Filled with lots of examples and code, the book includes includes complete coverage of Android, iOS, BlackBerry 1,0 and Windows Phone development for Cordova.
Topics covered include
The author maintains a web site for the book at cordovaprogramming.com where updates, errata, and the source code for the book are available.
Learn Apache Cordova 3 Programming
Download the sample pages (includes Chapter 6)
Foreword x
Preface xi
Acknowledgments xiv
Chapter 1: The What, How, Why, and More of Apache Cordova 1
Introduction to Apache Cordova 1
What Is Adobe PhoneGap? 7
PhoneGap History 7
Cordova Going Forward 8
Supported Platforms 9
Cordova License 9
Working with Cordova 10
Cordova Plugins 14
Putting Cordova to Best Use 14
Getting Support 15
Resources 16
Hybrid Application Frameworks 18
Wrap-Up 19
Chapter 2: Installing the Cordova and PhoneGap Frameworks 20
Installing Apache Cordova 20
Ant-Based Command-Line Interface 25
Installing Adobe PhoneGap 25
Wrap-Up 27
Chapter 3: Installing the Cordova Command-Line Interface 28
Installing the CLI 28
Wrap-Up 41
Chapter 4: Using the Cordova Command-Line Interface 42
About the CLI 42
Troubleshooting the CLI 43
CLI Command Summary 43
Using the CLI 44
Wrap-Up 58
Chapter 5: ANATOMY OF A CORDOVA APPLICATION 59
Hello World! 59
Cordova Initialization 60
Leveraging Cordova APIs 64
Enhancing the User Interface of a Cordova Application 66
The Generated Web Application Files 71
Wrap-Up 75
Chapter 6: The Mechanics of Cordova Development 76
Cordova Development Issues 76
Developing Cordova Applications 78
Testing Cordova Applications 82
Leveraging Cordova Debugging Capabilities 84
Testing Applications Using the Ripple Emulator 93
Wrap-Up 95
Chapter 7: Android Development with Cordova 96
Working with the Android Development Tools 96
Using the ADT IDE 97
Debugging Outside of the ADT IDE 106
Grabbing a Screenshot 107
Debugging on a Physical Device 108
Wrap-Up 111
Chapter 8: Blackberry 10 Development with Cordova 112
Configuring Your Environment for BlackBerry Development 112
Configuring a BlackBerry Cordova Project 114
Defining BlackBerry 10 Targets 116
Debugging on a Device Simulator 120
Debugging on a Physical Device 129
Wrap-Up 129
Chapter 9: iOS Development with Cordova 130
Working with Xcode 130
Debugging iOS Applications 131
Debugging on a Physical Device 132
Using the Safari Web Inspector 132
Wrap-Up 138
Chapter 10: Windows Phone 8 Development with Cordova 139
Getting Started with Windows Phone Development 139
Configuring a Windows 8 Device for Application Testing 140
Running a Cordova Application Using Visual Studio 142
Wrap-Up 148
Chapter 11: Using PhoneGap Build 149
What Is PhoneGap Build? 149
Using PhoneGap Build 152
Wrap-Up 162
Chapter 12: Working with the Cordova APIs 163
The Cordova Core APIs 163
Working with the API Cordova Documentation 164
Setting Application Permissions 165
Cordova Objects 168
Alerting the User 170
Cordova Events 175
Hardware APIs 176
Globalization 188
Working with the Contacts Application 193
Playing/Recording Media Files 197
InAppBrowser 199
Splash Screen 205
Wrap-Up 205
Chapter 13: Creating Cordova Plugins 206
Anatomy of a Cordova Plugin 206
Creating a Simple Plugin 207
Creating a Native Plugin 211
Deploying Plugins 228
Wrap-Up 228
Chapter 14: Building a Cordova Application 229
About the Application 229
Creating the Application 230
Using Merges 239
Testing the Application 240
Wrap-Up 242
Chapter 15: Extending Cordova to the Enterprise 243
Mobile Application Development Platforms 243
SAP Mobile Platform 244
Kapsel 246
Wrap-Up 248