Building applications for each device–iPhone, Android, Windows Mobile and more–requires different frameworks and languages. PhoneGap solves this by using standards-based web technologies to bridge web applications and mobile devices. Since PhoneGap apps are standards compliant, they’re future-proofed to work with browsers as they evolve.
The PhoneGap code was contributed to the Apache Software Foundation (ASF) under the name Apache Cordova and graduated to top-level project status in October 2012
Read more about PhoneGap’s beliefs, goals, and philosophy http://phonegap.com/2012/05/09/phonegap-beliefs-goals-and-philosophy
Apps using Cordova are still packaged as apps using the platform SDKs, and can be made available for installation from each device’s app store.
Getting Started guide : http://docs.phonegap.com/guide_getting-started_index.md.html
After reading Getting Started guide, you will download the required packages according to platform, set PATH environment variable and setup new project.
Here all code is for android platform.
Set up new project :
Here we created project name demoPhonegap. After creating new project, you will find all HTML,CSS, images and js files in /demoPhonegap//assets/www. There will be a java file named demo.java in demoPhonegap/src/com/phonegap/app/demo.java.
In this file , you will find this code :
when we deploy mob app into emulator then initially it will load the file whose path is given in loadUrl()
example code :
I created demo.html whose path is /demoPhonegap//assets/www/demo.html
In this code, I created a text box and a button.When user will click on button, then an alert will be appear containing text of textbox.
So now, We have to mention this file in loadUrl() method.