My Sites


Saturday, June 7, 2014

Develop mobile applications using Phonegap


Phonegap is  is a mobile development framework which uses JavaScript, HTML 5 , and CSS3 to build applications for mobile devices.The software underlying PhoneGap is Apache Cordova which is an open source software.

Let's get started!
1.) Make sure you have setup Nodejs then setup phone gap using following command.                    
                                npm install -g phonegap
2.) You can setup platforms as you like,
                                cordova platform add android
                                cordova platform add ios
                                cordova platform add amazon-fireos
3.) Go to directory where you want to create the phonegap application and create project using,
                               phonegap create helloWorld

4.) Go to helloWorld  cd helloWorld
5.) Build application in your platform
                                       cordova build android
6.) Setup your emulator (using AVD ) or plug your mobile device.
                               cordova emulate android
                               cordova run android


7.) You can edit index.html or add more html pages. js files ,resources in www folder inside the created project.use javascript to develop program , the api is provided by phone gap . http://docs.phonegap.com/en/edge/cordova_events_events.md.html#Events 
 
sudo gedit .profile
sudo gedit /etc/profile
. /etc/profile 
sudo gedit  .bashrc
 
# Android Path
PATH=$PATH:$HOME/Documents/Android/sdk:$HOME/Documents/Android/sdk/tools
export PATH

# For SDK version r_08 and higher, also add this for adb:
PATH=$PATH:$HOME/Documents/Android/sdk/platform-tools
export PATH

android avd
android sdk
android list sdk
 
What’s The Best Framework for Building Mobile Apps?
I found a nice article which supports this question with detailed information. Please have a look on the following amazing article.

1 comment: