Apache Cordova in Action
Raymond K. Camden
  • October 2015
  • ISBN 9781633430068
  • 248 pages
  • printed in black & white

A great resource for beginners and experienced programmers alike.

Ivo Štimac, KING ICT

Apache Cordova in Action teaches you to create and launch hybrid mobile apps using Cordova or Phonegap. By following carefully selected examples, step-by-step tutorials, and crystal-clear explanations, you'll learn to build apps from the Cordova CLI, how to make use of device features like the camera and accelerometer, how to submit your apps to Google Play and the Apple App Store, and more.

About the Technology

Developing a mobile app requires extensive knowledge of native programming techniques for multiple platforms. Apache Cordova lets you use your existing skills in web development (HTML, CSS, and JavaScript) to build powerful mobile apps. Your apps also get the power of integration with native device features like the camera and file system.

About the book

Apache Cordova in Action teaches you how to design, create, and launch hybrid mobile apps people will want to use. With the help of straightforward, real-world examples, you'll learn to build apps from the Cordova CLI and to make use of native device features like the camera and accelerometer. You'll learn testing techniques and discover the PhoneGap Build service and how to submit your apps to Google Play and the Apple App Store. Along the way, this helpful guide discusses mobile app design and shows you how to create effective, professional-quality UI and UX.

Table of Contents detailed table of contents



about this book

author online

about the author

about the cover illustration


1. What is Cordova?

1.1. The History of PhoneGap (and Cordova)

1.2. How PhoneGap and Cordova relate

1.2.1. How are they the same?

1.2.2. How do they differ?

1.2.3. Official Web Sites

1.3. What Cordova provides

1.3.1. Command-line tool

1.3.2. Hardware access

1.3.3. Plugin support

1.4. What doesn’t Cordova provide

1.5. When you wouldn’t use Cordova

1.6. Web standards and Cordova

1.7. Summary

2. Installing Cordova and the Android SDK

2.1. Installing the Android SDK

2.2. Installing Apache Ant

2.3. Installing Git

2.4. Installing Node.js

2.5. Setting up your PATH

2.6. Installing Cordova

2.7. Making your first Cordova project

2.8. Summary


3. Creating Cordova projects

3.1. Creating projects with the Cordova CLI

3.2. Digging into a Cordova project

3.3. Adding platforms

3.4. Working with Android emulators and devices

3.4.1. Working with devices

3.5. Sending your Cordova application to the emulator (or device)

3.6. Building your first real application

3.7. Summary

4. Using plugins to access device features

4.1. What are plugins?

4.2. Finding (and evaluating) plugins

4.3. Managing plugins and the Cordova CLI

4.4. Plugins and the development cycle

4.5. The deviceready event

4.6. Plugin example: Dialogs

4.6.1. Better dialogs with the Cordova Dialogs plugin

4.6.2. Building an application with the Dialogs plugin

4.7. Plugin example: Camera

4.8. Plugin example: Contacts

4.9. Summary

5. Mobile design and user experience

5.1. Congratulations - you’re a (horrible) mobile developer!

5.1.1. A good example of a bad UI

5.1.2. Put some lipstick on that pig: improving the application with CSS

5.1.3. The meta viewport tag

5.2. Enhancing your Cordova UI with Bootstrap

5.2.1. Introducing Bootstrap

5.2.2. Another example: the camera app

5.2.3. Bootstrap does more

5.3. Mobile UI frameworks: an overview

5.3.1. Ionic: UI, UX, and more

5.3.2. jQuery Mobile: powerful and simple

5.3.3. Ratchet: Android and iOS friendly

5.3.4. Kendo UI: large and commercially supported

5.4. Summary

6. Considerations when building mobile apps

6.1. Congratulations—you’re a (slightly better) mobile developer!

6.2. Single-page applications and you

6.2.1. So why should you care?

6.2.2. A SPA for you, a SPA for me, a SPA for everyone!

6.2.3. jQuery Mobile: the basics

6.2.4. Mixing jQuery Mobile and Cordova

6.3. Building offline-ready Cordova applications

6.3.1. Problems with the application

6.3.2. Adding offline support to the GitHub Search application

6.4. Supporting the entire planet

6.4.1. Improving the GitHub Search application for the world

6.5. Storing data on the device

6.5.1. A real-world example

6.5.2. Options for handling data storage

6.5.3. Selecting the type of data storage

6.5.4. Improving the GitHub Search application

6.6. Summary

7. Tools for debugging Cordova and other hybrid apps

7.1. Finding the bug is nine-tenths the work of solving it

7.2. A broken app

7.3. Working with Chrome remote debugging on Android

7.3.1. Preparing for Chrome remote debugging

7.3.2. Features of Chrome’s developer tools

7.3.3. Putting Chrome remote debugging to use

7.4. Remote debugging with iOS and Safari

7.4.1. Preparing for Safari remote debugging

7.4.2. Features of Safari’s developer tools

7.5. Working with Weinre

7.5.1. Installing Weinre

7.5.2. Running Weinre

7.6. Other debugging options

7.6.1. Skip Cordova!

7.6.2. GapDebug

7.7. Summary

8. Creating custom plugins

8.1. Why write your own plugins?

8.2. Plugin architecture

8.3. Building an Android plugin

8.3.1. Setting up the plugin

8.3.2. Writing the plugin code

8.3.3. Working with your plugin

8.3.4. Adding the plugin

8.4. Summary

9. Packing options for Cordova projects

9.1. Using config.xml to customize your Cordova project

9.1.1. General (or global) preferences

9.1.2. Specifying preferences for a platform

9.1.3. Finding other preferences

9.1.4. Working with icons and splash-screens

9.2. Using merges for multiple platforms

9.3. Using hooks to enhance the Cordova CLI

9.3.1. Why do you use hooks?

9.3.2. Defining hooks

9.3.3. Hooks: before and after CLI commands

9.3.4. Example: use a hook to add plugins for a platform

9.3.5. Using hooks with config.xml

9.3.6. Working with hook arguments

9.4. Summary

10. Using PhoneGap tools

10.1. Working with PhoneGap

10.2. PhoneGap Build service

10.2.1. Create a PhoneGap Build account

10.2.2. Creating your first phoneGap Build application

10.2.3. Digging deeper into PhoneGap Build

10.2.4. Using plugins with PhoneGap Build

10.2.5. More configuration options

10.2.6. More PhoneGap Build features

10.3. PhoneGap Developer App

10.3.1. Installing

10.3.2. Using the PhoneGap Developer App

10.4. Summary


11. Submitting your app

11.1. Releasing your app

11.2. Submitting your Android app

11.2.1. Signing your app

11.2.2. Publishing to the Android market

11.3. Submitting your iOS app

11.3.1. Signing your app

11.3.2. Publishing to the iOS market

11.4. Summary

12. Building an RSS reader app with Ionic

12.1. Designing a simple RSS reader application

12.2. Using Ionic for Cordova development

12.2.1. The ionic serve feature

12.3. RSS reader app: part one

12.3.1. Starting the app

12.3.2. Application modules

12.3.3. Reviewing what you’ve done

12.4. RSS reader app: part two

12.4.1. Adding the loading indicator

12.4.2. Adding the InAppBrowser plugin

12.4.3. Adding the SocialSharing plugin

12.4.4. Adding offline support

12.5. Summary

What's inside

  • Build mobile apps
  • UI, UX, and testing techniques
  • Deploy to Google Play and the Apple App Store
  • Employ libraries like Bootstrap, jQuery Mobile, and Ionic

About the reader

Readers should be familiar with HTML, CSS, and JavaScript. No experience with mobile app development needed.

About the author

Raymond Camden is a developer advocate for IBM. He is passionate about mobile development and has spoken at conferences worldwide.

placing your order...

Don't refresh or navigate away from the page.
print book $24.99 $39.99 pBook + eBook + liveBook
Additional shipping charges may apply
Apache Cordova in Action (print book) added to cart
continue shopping
go to cart

eBook $31.99 3 formats + liveBook
Apache Cordova in Action (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.
customers also reading

This book

FREE domestic shipping on three or more pBooks