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

replace it with following the line of code

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.

Share on Facebook1Share on LinkedIn0Tweet about this on TwitterShare on Google+0Buffer this pageDigg thisShare on Reddit0

Comments (1)

  1. nice article bhumi

Leave a Reply

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

Most Popular Posts

What Are WordPress Nonces?

Posted on 1 year ago


What is DocType In HTML

Posted on 5 years ago


Facade implementation in Laravel

Updated 3 weeks ago


MySQL coalesce() function

Updated 17 years ago


How to use JavaScript Promise API?

Updated 17 years ago


What are Lambdas and Closures in PHP?

Updated 17 years ago


The Reader’s Poll – June 2015

Posted on 2 years ago


The Reader’s Poll – August 2014

Posted on 3 years ago


The Reader’s Poll – June 2014

Posted on 3 years ago


The Readers’ Poll – May 2014

Posted on 3 years ago


The Readers’ Poll – August 2013

Posted on 4 years ago