This post demonstrates how to create a very simple example of
PhoneGap application via
Stuffs used in this post.
NOTE: The installation of
npm and node is not covered here.
- Create a new directory, e.g.,
Windows command lineand change directory to that newly created directory.
MS DOS1cd c:\Users\user123\Desktop\phonegap\example01
- From the same command line window, install
MS DOS1npm install -g phonegap
- Create a PhoneGap application in the same directory
MS DOS1phonegap create . "com.turreta.phonegap" "My App"
Then, we’re done!
Don’t close yet the command line window. We’ll get back to it to start our application a bit later.
The PhoneGap Application
The newly created project has these files in its directory.
Let’s now modify the application for it to display “Hello world!”.
Go to the
index.html by adding this
Testing the PhoneGap Application
From the same command line window, invoke the following command.
IPs addresses. We’ll use one of them to access the