Back to Top

PhoneGap Tutorial for Beginners

Getting Started With PhoneGap

PhoneGap is a framework for mobile development that is useful to develop an application using HTML, JS, CSS which supports in all well known mobile platforms.

Here, I am going to explain about to set up PhoneGap into eclipse for android application in Windows.

Getting Started With PhoneGap

Before you start to setup project install Eclipse Indigo with plugins Android SDK and ADT.

Let’s understand step by step to setup project in Eclipse:

First of all, Go to New >> project >> Android >> android application project.

Click on Next and add application name and select Target SDK and Compile with API 10: Android 2.3.3(GingerBread) and a theme will be none.

Read: How to call Multiple Change Page in Single HTML

After project setup done. Create a folder into assets folder of your project and place your all HTML provided by the designer into it.

Now, Go to your downloaded PhoneGap source folder and then Go to the directory lib/android. Copy cordova Jar file and put into libs folder of your project.

Next is,Interconnection of library is require so Right click on your project and Go to properties and Go to JAVA BUILD on Add JARs and select your added Cordova Jar file from libs folder.

After that Go to order and export tab in the same screen and check Cordova Jar file and click Ok.

Copy your cordova Js file from PhoneGap source and paste into assets//js folder.

Copy xml folder from PhoneGap source and put it into res folder.

Had All done? Yes, Steps are over. Your android PhoneGap project is setup now.

Must Read: To exit from Android application on Back button

Run Application:

Now,Go to folder src >> folder >> folder and open MainActivity file.

You will get below line of code into it

public class MainActivity extends  Activity

replace it with following the line of code

public class MainActivity extends  DroidGap

Now, Press ctrl + shift + o in same file which will import all require packages and libraries.

That’s it. Run your Android application!.This concludes today’s tutorial! I’m hoping that you’ve found this tutorial useful.

Don’t hesitate to post your comments if you need help. As always, thanks for reading. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Comments (1)

  1. nice article bhumi

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

How does CI/CD works on AWS?

Posted on 2 years ago


Inheritance in object-oriented PHP

Posted on 2 years ago


Control Flow Functions in MySQL

Posted on 3 years ago


Hello world

Updated 1 week ago

Nick Carter

In depth Understanding of Laravel Core

Updated 2 months ago


ECMAScript 6 New Features – 2

Updated 1 year ago


The Reader’s Poll – June 2015

Posted on 4 years ago


The Reader’s Poll – August 2014

Posted on 4 years ago


The Reader’s Poll – June 2014

Posted on 5 years ago


The Readers’ Poll – May 2014

Posted on 5 years ago


The Readers’ Poll – August 2013

Posted on 5 years ago