PhoneGap hello world tutorial
Phonegap Installation Step by Step Guide explained to you how to configure & Setup your project environment for building your Apache Cordova / PhoneGap Applications. Read this article for building you first PhoneGap applications
Create Your PhoneGap / Apache Cordova Project
Run this Command in your command prompt
cordova create FolderName com.companyname.appname AppName
FolderName: Your Folder name for your New Project
com.companyname.appname: Unique identifier for your application.
AppName: is your application name (without Space)
cordova create FirstProject com.phonegappro.hello HelloWorld
Add Your Platform.
You can add android, iOS, Windows or other platforms to your phonegap projects
cordova platform add android
cordova platform add ios
Add your plugin if required,
You can add required plugins for your Cordova projects, such as device, device-motion, Geolocation and more. Refer our cheatsheet for Cordova commands https://phonegappro.com/tutorials/phonegap-cheatsheet-part-2/
cordova plugin add org.apache.cordova.device
cordova plugin add cordova-plugin-device
When you execute this command, plugins will be download & installed automatically as per your platform
Building your first PhoneGap Project
For Getting the .apk / output file you’ve to build your PhoneGap projects
cordova build android
Emulate Your Project
Run emulate command for running your project on the emulator. for emulating your project you need to create an emulator from your AVD.
cordova emulate android