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.
Getting Started With PhoneGap
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.
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 PATH.click 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/
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.
Now,Go to folder src >>
You will get below line of code into it
replace it with following the line of code
public class MainActivity extends DroidGap
That’s it. Run your Android application!.This concludes today’s tutorial! I’m hoping that you’ve found this tutorial useful.