Getting Started with PhoneGap: Developing for Windows Phone and Android

Rahul Pulikkot Nath
Rahul Pulikkot Nath

Table of Contents

With lots of devices and operating systems out there, developing a native application for each of these platforms might not always be an option for many businesses, because of the time, effort and money that would be required to be on all platforms. PhoneGap is one option that could be explored in this case, which helps to develop hybrid applications that can exists on a variety of platforms integrating with platform specific features. Apache Cordova is what powers PhoneGap and is free and open source under the Apache License, Version 2.0.

Setting up PhoneGap is pretty easy and direct with its integration with node.js. Lets take a look on how to setup our project from scratch.

  1. Install node.js
  2. Install PhoneGap using node.js
  3. Install Cordova npm install –g cordova
  4. Now we have everything setup for PhoneGap project. Lets create the project. Navigate to your project root folder and create a project.
  5. Lets now create a native project, for windows phone.
  6. Once we copy out the updated files in platform specific _www _folder into root www folder we can go ahead and add android platform.

With PhoneGap/Cordova, you can see how easy it is to have an app in various platforms of your choice. We have not seen on how to utilize any of the platform specific features of devices using PhoneGap, but I am sure that you should be able to figure out from here, now that you have all that you need up and running.

Cordova_WP
Cordova_Android

The source code for the sample is available here. Don’t forget to update the api key for 500px before you run the application.

AndroidWindows Phone