PhoneGap Beginner's Guide

Build cross-platform mobile applications with the PhoneGap open source development framework with this book and eBook

PhoneGap Beginner's Guide

Beginner's Guide
Andrew Lunny

Build cross-platform mobile applications with the PhoneGap open source development framework with this book and eBook
$26.99
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook
$12.99 p/month

Want this title & more? Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.
+ Collection
Free Sample

Book Details

ISBN 139781849515368
Paperback328 pages

About This Book

  • Learn how to use the PhoneGap mobile application framework
  • Develop cross-platform code for iOS, Android, BlackBerry, and more
  • Write robust and extensible JavaScript code
  • Master new HTML5 and CSS3 APIs
  • Full of practical tutorials to get you writing code right away

Who This Book Is For

This book is for developers, ideally with web development experience, who are interested in developing for the emerging mobile market, but do not want to learn a new SDK for every phone on the shelf. Readers should be comfortable with JavaScript, HTML, and CSS, and interested in learning the new advances in those technologies that allow for rich, native-style experiences.

Table of Contents

Chapter 1: Installing PhoneGap
Operating systems
Dependencies
Getting started with iOS
Time for action – Getting an app running on the simulator
Installing PhoneGap-iPhone
Time for action – Hello World with PhoneGap-iPhone
Getting started with Android
Time for action – Getting the SDK running
Time for action – Hello World on PhoneGap Android
Getting started with BlackBerry web works
Time for action – Your first PhoneGap BlackBerry app
Summary
Chapter 2: Building and Debugging on Multiple Platforms
Designing with desktop browsers
Developing our first application: You Are The Best
Time for action – Initial design and functionality
Using the web inspector
Time for action – Simple logging and error checking
Moving to native platforms
Time for action – You Are The Best for iPhone
Summary
Chapter 3: Mobile Web to Mobile Applications
Implementing web server roles
Time for action – Implementing LocalStorage
View templating
Time for action – Food detail view
Time for action – Talking about food
Summary
Chapter 4: Managing a Cross-Platform Codebase
Inherent differences between platforms
Time for action - Detection and fallbacks
Summary
Chapter 5: HTML5 APIs and Mobile JavaScript
Mobile JavaScript
Time for action – Downloading, building, and using XUI
HTML5
Time for action – My dinner with PhoneGap
Time for action: Dinner dashboard
Summary
Chapter 6: CSS3: Transitions, Transforms, and Animation
Translate with transitions
Time for action – The modal tweet view
Scrolling
Time for action – Scrolling list of food
Explicit animations
Time for action – Animating our headline
Summary
Chapter 7: Accessing Device Sensors with PhoneGap
What are device sensors?
Time for action – A postcard writer
Accelerometer data
Time for action – Detecting shakes
Orientation media queries
Time for action – Landscape postcards
Summary
Chapter 8: Accessing Camera Data and Files
Time for action – Hello World with the Camera API
What about when we finally get an image?
Time for action – Getting a file path to display
Time for action – Saving pictures
Summary
Chapter 9: Reading and Writing to Contacts
Time for action – navigator.service.contacts.find
Time for action – Making friends
Summary
Chapter 10: PhoneGap Plugins
Getting PhoneGap plugins
Time for action – Integrating ChildBrowser
Time for action – Battery view
Porting your plugin
Time for action – Android and BlackBerry
Summary
Chapter 11: Working Offline: Sync and Caching
Ruby and Sinatra
Time for action – A news site, with an API
Time for action – Caching stories in a local database
Summary

What You Will Learn

  • Rich interactions using HTML5 and CSS3 APIs
  • Mobile JavaScript expertise: write code that travels anywhere
  • Working offline: use web development skills with native code to create installable web-apps that sync with remote servers
  • Enhancing application experiences with real-time sensor data
  • Integrating with cameras and images to enrich users' experiences
  • Access device contacts and data for fully native interactions
  • Detecting devices precisely and skillfully to progressively enhance your user interface within a single application
  • Pluging in to PhoneGap: adding functionality to the framework with custom native code

In Detail

With the increasingly fragmented mobile application landscape, it's important to find strategies that allow for rapid development on many different platforms. Using PhoneGap, you will be able to use a single codebase that targets iOS, Android, BlackBerry, and more, just using web development skills.

PhoneGap  Beginner's Guide will show you how to use the PhoneGap mobile development framework to target multiple mobile platforms: iOS, Android, BlackBerry, and more with a single application. With PhoneGap, you can use existing web development skills, instead of learning a new environment for every platform on the market.

PhoneGap Beginner's Guide will escalate you from being a novice at mobile development to writing complex applications that target multiple platforms, through learning the APIs and development process of the PhoneGap framework.

You will learn how to manage a code base that targets multiple mobile platforms; how to use new HTML5 and CSS3 APIs to create rich, responsive user interfaces; and how to use the PhoneGap APIs to integrate with native functionality such as device sensors, contacts, and cameras.

After reading PhoneGap Beginner's Guide, you will have the skills and the confidence to target all of the major mobile platforms with rich and responsive applications.

Authors

Table of Contents

Chapter 1: Installing PhoneGap
Operating systems
Dependencies
Getting started with iOS
Time for action – Getting an app running on the simulator
Installing PhoneGap-iPhone
Time for action – Hello World with PhoneGap-iPhone
Getting started with Android
Time for action – Getting the SDK running
Time for action – Hello World on PhoneGap Android
Getting started with BlackBerry web works
Time for action – Your first PhoneGap BlackBerry app
Summary
Chapter 2: Building and Debugging on Multiple Platforms
Designing with desktop browsers
Developing our first application: You Are The Best
Time for action – Initial design and functionality
Using the web inspector
Time for action – Simple logging and error checking
Moving to native platforms
Time for action – You Are The Best for iPhone
Summary
Chapter 3: Mobile Web to Mobile Applications
Implementing web server roles
Time for action – Implementing LocalStorage
View templating
Time for action – Food detail view
Time for action – Talking about food
Summary
Chapter 4: Managing a Cross-Platform Codebase
Inherent differences between platforms
Time for action - Detection and fallbacks
Summary
Chapter 5: HTML5 APIs and Mobile JavaScript
Mobile JavaScript
Time for action – Downloading, building, and using XUI
HTML5
Time for action – My dinner with PhoneGap
Time for action: Dinner dashboard
Summary
Chapter 6: CSS3: Transitions, Transforms, and Animation
Translate with transitions
Time for action – The modal tweet view
Scrolling
Time for action – Scrolling list of food
Explicit animations
Time for action – Animating our headline
Summary
Chapter 7: Accessing Device Sensors with PhoneGap
What are device sensors?
Time for action – A postcard writer
Accelerometer data
Time for action – Detecting shakes
Orientation media queries
Time for action – Landscape postcards
Summary
Chapter 8: Accessing Camera Data and Files
Time for action – Hello World with the Camera API
What about when we finally get an image?
Time for action – Getting a file path to display
Time for action – Saving pictures
Summary
Chapter 9: Reading and Writing to Contacts
Time for action – navigator.service.contacts.find
Time for action – Making friends
Summary
Chapter 10: PhoneGap Plugins
Getting PhoneGap plugins
Time for action – Integrating ChildBrowser
Time for action – Battery view
Porting your plugin
Time for action – Android and BlackBerry
Summary
Chapter 11: Working Offline: Sync and Caching
Ruby and Sinatra
Time for action – A news site, with an API
Time for action – Caching stories in a local database
Summary

Book Details

ISBN 139781849515368
Paperback328 pages
Read More