Book Image

PhoneGap Beginners Guide (third edition)

Book Image

PhoneGap Beginners Guide (third edition)

Overview of this book

Table of Contents (22 chapters)
PhoneGap Beginner's Guide Third Edition
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Related Plugin Resources
Index

Time for action – the Hello World example


PhoneGap is an intermediary layer that talks to the mobile device and the application; the app resides inside a browser, and, using the PhoneGap API, you can connect to phone features such as contacts and camera.

The UI layer of a PhoneGap application is a web browser view that takes up 100 percent of the device's width and height; think of the UI layer as a browser. The UI layer is known as WebView. The WebView used by PhoneGap is the same one used by the native operating system.

Having discussed the basics of PhoneGap and the command-line tools, we will now create a simple application. This is not the typical Hello World example. With the already learned commands and configured environment with npm, let's create a new project:

C:\> phonegap create example1
C:\> cd example1
C:\example> phonegap platform add android

With the completion of the preceding commands, we created a new project called example1 and added Android platform support to...