PhoneGap: Beginner's Guide - Third Edition
eBook - ePub

PhoneGap: Beginner's Guide - Third Edition

  1. 284 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

PhoneGap: Beginner's Guide - Third Edition

Book details
Book preview
Table of contents
Citations

About This Book

About This Book

  • Build hybrid mobile applications with PhoneGap/Cordova using HTML, CSS and JavaScript
  • Optimize and increase the performance of you applications with Phonegap/Cordova plugins
  • A step by step guide, filled with real-world examples to help you create hybrid mobile applications

Who This Book Is For

This book is for web developers who want to be productive in the mobile market quickly. In fact, by using PhoneGap, it's possible to deploy native applications based on web standards. This book assumes a very small knowledge of HTML/CSS/JavaScript and mobile platforms, such as Android, BlackBerry, iOS, and Windows Phone, and takes the reader step-by-step into a deep overview of PhoneGap and its APIs.

What You Will Learn

  • Get acquainted with the fundamentals of PhoneGap
  • Use HTML, CSS, and JavaScript to create, debug, and deploy your own mobile applications
  • Work with mobile-specific frameworks such as iOS and Android to design your applications
  • Install and work with all PhoneGap/Cordova plugins
  • Implement device-oriented APIs related to contacts, files, the camera, and geolocations
  • Use PhoneGap/Cordova events for accessibility
  • Enhance and optimize your application for real-time environments

In Detail

Given the increase in usage of mobile devices, mobile app development is in huge demand. This book provides you with the skills you need to successfully create, develop, debug, and deploy a cross-platform mobile application with PhoneGap 5. The book starts with the basics of PhoneGap, covering setting up your development environment, creating a simple project, and debugging and deploying it to your mobile devices. By sequentially working through the sections in each chapter, you will quickly get to know about the available features of various mobile frameworks and the various PhoneGap plugins you can utilize to create your apps. You will then learn how to build a hybrid application using PhoneGap. Finally, by the end of the book, you will be able to implement the most common features of modern mobile apps and build rich, native-style applications.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access PhoneGap: Beginner's Guide - Third Edition by Purusothaman Ramanujam, Giorgio Natili, Giorgio Natili in PDF and/or ePUB format, as well as other popular books in Computer Science & Hardware. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781784393045
Edition
3

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...

Table of contents

  1. PhoneGap Beginner's Guide Third Edition